Skip to content

Commit 4ab6c91

Browse files
committed
feat: utils package vitest add
1 parent e05fa04 commit 4ab6c91

File tree

8 files changed

+775
-10
lines changed

8 files changed

+775
-10
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
{
44
"mode": "auto"
55
}
6-
]
6+
],
7+
"typescript.tsdk": "node_modules/typescript/lib"
78
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"build": "turbo build",
77
"dev": "turbo dev",
88
"lint": "turbo lint",
9+
"test": "turbo run test",
10+
"test:watch": "turbo run test:watch",
911
"format": "prettier --write \"**/*.{ts,tsx,md}\""
1012
},
1113
"devDependencies": {

packages/notion-to-jsx/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"author": "Jinsoo Lee",
1111
"license": "MIT",
1212
"devDependencies": {
13-
"typescript": "^5.6.3"
13+
"typescript": "^5.6.3",
14+
"@repo/eslint-config": "workspace:*",
15+
"@repo/typescript-config": "workspace:*"
1416
}
1517
}

packages/notion-to-utils/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "vitest",
8+
"test:watch": "vitest --watch"
89
},
910
"keywords": [],
1011
"author": "Jinsoo Lee",
1112
"license": "MIT",
1213
"devDependencies": {
13-
"typescript": "^5.6.3"
14+
"typescript": "^5.6.3",
15+
"vitest": "^2.1.2",
16+
"@repo/eslint-config": "workspace:*",
17+
"@repo/typescript-config": "workspace:*"
1418
}
1519
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { expect, test } from 'vitest';
2+
3+
const sum = (a: number, b: number) => a + b;
4+
5+
test('adds 1 + 2 to equal 3', () => {
6+
expect(sum(1, 2)).toBe(3);
7+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'vitest/config';
2+
3+
export default defineConfig({
4+
test: {
5+
// ... Specify options here.
6+
},
7+
});

0 commit comments

Comments
 (0)