Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrnt committed Jul 31, 2023
1 parent 8a73ba3 commit becb39f
Show file tree
Hide file tree
Showing 9 changed files with 1,317 additions and 624 deletions.
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"chart.js": "^4.2.1",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
"crypto": "^1.0.1",
"csstype": "^3.1.2",
"dayjs": "^1.11.7",
"framer-motion": "^10.12.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/utils/apiKey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createHmac, randomBytes, scryptSync, timingSafeEqual } from "crypto";
import { createHmac, randomBytes } from "crypto";

export function generateRandomString(length: number): string {
const apiKeyLength = 32; // Adjust the length of the API key as needed
Expand Down
11 changes: 4 additions & 7 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@tryabby/cli",
"version": "0.0.1",
"private": true,
"main": "./lib/index.js",
"private": false,
"main": "./dist/index.js",
"bin": {
"abby": "./lib/index.js"
"abby": "./dist/index.js"
},
"scripts": {
"start": "pnpm run build && ./dist/index.js",
Expand All @@ -22,16 +22,13 @@
"figlet": "^1.6.0",
"msw": "^1.2.2",
"node-fetch": "^3.3.1",
"path": "^0.12.7",
"stringify-object": "^5.0.0",
"tsup": "^6.5.0",
"vite": "^4.4.2"
"vite": "^3.2.5"
},
"devDependencies": {
"@tryabby/core": "workspace:^",
"@types/figlet": "^1.5.6",
"@types/node": "^20.3.1",
"@types/stringify-object": "^4.0.2",
"nodemon": "^2.0.22",
"ts-node": "^10.9.1",
"tsconfig": "workspace:*",
Expand Down
39 changes: 4 additions & 35 deletions packages/cli/tests/mocks/reactSample.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,14 @@
import { createAbby } from "@tryabby/react";

const { AbbyProvider, useAbby } = createAbby({
projectId: "test",
tests: {
test1: {
variants: ["A", "B", "C", "D"],
},
test2: {
variants: ["A", "B"],
},
},
flags: ["flag1", "flag2"]
});{
projectId: "test",
tests: {
test1: {
variants: [
"A",
"B",
"C",
"D"
]
variants: ["A", "B", "C", "D"],
},
test2: {
variants: [
"A",
"B"
]
variants: ["A", "B"],
},
test3: {
variants: [
"A",
"B",
"C",
"D"
]
}
},
flags: [
"flag1",
"flag2",
"flag3"
]
}
flags: ["flag1", "flag2"],
});
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"tsup": "^6.5.0",
"typescript": "^4.9.3",
"vite": "^3.2.5",
"vitest": "^0.25.3",
"vitest": "^0.33.0",
"zod": "^3.19.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"tsup": "^6.5.0",
"typescript": "^4.9.3",
"vite": "^3.2.5",
"vitest": "^0.25.3"
"vitest": "^0.33.0"
},
"peerDependencies": {
"next": ">=13",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"tsup": "^6.5.0",
"typescript": "^4.9.3",
"vite": "^3.2.5",
"vitest": "^0.25.3"
"vitest": "^0.33.0"
},
"peerDependencies": {
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/svelte": "^3.2.2",
"@testing-library/user-event": "^14.4.3",
"@tsconfig/svelte": "^3.0.0",
"@tryabby/devtools": "workspace:*",
"@tsconfig/svelte": "^3.0.0",
"@types/jest": "^29.5.1",
"@types/js-cookie": "^3.0.3",
"@types/testing-library__jest-dom": "^5.14.5",
Expand All @@ -55,7 +55,7 @@
"typescript": "^4.9.3",
"vite": "^4.2.0",
"vite-plugin-dts": "2.3.0",
"vitest": "^0.25.8"
"vitest": "^0.33.0"
},
"dependencies": {
"@tryabby/core": "workspace:*",
Expand Down
Loading

0 comments on commit becb39f

Please sign in to comment.