-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scaffolding): replaced jest and ts-jest with vitest
- Loading branch information
Showing
19 changed files
with
670 additions
and
2,150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,11 +76,6 @@ jobs: | |
key: ${{ runner.os }}-${{ matrix.node }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node }}-node- | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.4.1 | ||
run_install: false | ||
- name: Install dependencies | ||
run: pnpm i | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,23 +13,20 @@ | |
"typecheck": "turbo run typecheck", | ||
"lint:ci": "turbo run lint:ci", | ||
"lint": "turbo run lint", | ||
"test": "turbo run test", | ||
"test:unit": "turbo run test:unit", | ||
"test:integration": "turbo run test:integration", | ||
"test:ci": "turbo run test:ci", | ||
"test": "pnpm -r --if-present test", | ||
"test:unit": "pnpm -r --if-present test:unit", | ||
"test:integration": "pnpm -r --if-present test:integration", | ||
"prepare": "husky" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.9.0", | ||
"@types/jest": "^29.1.2", | ||
"@types/node": "20.9.0", | ||
"husky": "^9.1.6", | ||
"jest": "^29.2.0", | ||
"lint-staged": "^15.2.10", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "29.0.3", | ||
"turbo": "^2.1.2", | ||
"typescript": "^4.8.4" | ||
"typescript": "^5.6.0", | ||
"vitest": "^2.1.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"pre-commit": "lint-staged", | ||
|
13 changes: 13 additions & 0 deletions
13
packages/common-utils/__tests__/integration/uses-internet.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
describe('should be able to connect to the internet', () => { | ||
it('/todos', async () => { | ||
const response = await fetch('https://jsonplaceholder.typicode.com/todos') | ||
const todos = await response.json() | ||
expect(todos.length).toBeGreaterThan(0) | ||
}) | ||
|
||
it('/users', async () => { | ||
const response = await fetch('https://jsonplaceholder.typicode.com/users') | ||
const users = await response.json() | ||
expect(users.length).toBeGreaterThan(0) | ||
}) | ||
}) |
5 changes: 5 additions & 0 deletions
5
packages/common-utils/__tests__/unit/__snapshots__/sum.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`sum > sum([]) = 0 1`] = `0`; | ||
|
||
exports[`sum > sum([2, 3, 0, 1]) = 6 1`] = `0`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('basic', () => { | ||
it('silly example', () => { | ||
expect([]).toHaveLength(0) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.