Skip to content

Commit e2e12ba

Browse files
herejerkalis
andauthored
Feat/migrate jest to vitest (#346)
Co-authored-by: Rosco Kalis <[email protected]>
1 parent 7aeea22 commit e2e12ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+882
-2824
lines changed

.cspell.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@
280280
"**.pdf",
281281
// Do not spellcheck generated code
282282
"**/dist/**",
283-
"**/dist-test/**",
284283
"**/coverage/**",
285284
"**/build/**",
286285
"**/.docusaurus/**",

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
**/dist/
2-
**/dist-test/
32
**/node_modules/
43
**/grammar/
54
/website/

.eslintrc.cjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ module.exports = {
1111
sourceType: 'module', // Allows for the use of imports
1212
extraFileExtensions: ['.cjs'],
1313
},
14-
env: {
15-
'jest': true,
16-
},
1714
rules: {
1815
'max-len': ['error', { code: 125, ignoreStrings: true, ignoreTemplateLiterals: true }],
1916
'import/no-cycle': 0, // Needed for AST -> AstVisitor -> AST

.github/workflows/github-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: yarn
3333

3434
- name: Run tests
35-
run: yarn test -- -- --coverage --coverageProvider=v8
35+
run: yarn test -- -- --coverage --coverage.provider=v8
3636

3737
- name: Run linter
3838
run: yarn lint

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
lerna-debug.log
22
npm-debug.log
33
**/dist/
4-
**/dist-test/
54
**/node_modules/
65

76
**/.DS_Store

examples/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cashscript-examples",
33
"private": true,
4-
"version": "0.12.0",
4+
"version": "0.12.1",
55
"description": "Usage examples of the CashScript SDK",
66
"main": "p2pkh.js",
77
"type": "module",
@@ -13,8 +13,8 @@
1313
"dependencies": {
1414
"@bitauth/libauth": "^3.1.0-next.8",
1515
"@types/node": "^22.17.0",
16-
"cashc": "^0.12.0",
17-
"cashscript": "^0.12.0",
16+
"cashc": "^0.12.1",
17+
"cashscript": "^0.12.1",
1818
"eslint": "^8.56.0",
1919
"typescript": "^5.9.2"
2020
}

examples/testing-suite/artifacts/example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
"name": "cashc",
4444
"version": "0.12.0"
4545
},
46-
"updatedAt": "2025-10-02T09:56:11.510Z"
46+
"updatedAt": "2025-12-09T10:19:09.338Z"
4747
}

examples/testing-suite/jest.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/testing-suite/jest.setup.js

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "testing-suite",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"description": "Example project to develop and test CashScript contracts",
55
"main": "index.js",
66
"type": "module",
@@ -13,28 +13,24 @@
1313
},
1414
"scripts": {
1515
"build": "yarn clean && yarn compile",
16-
"build:test": "yarn clean:test && yarn compile:test",
1716
"clean": "rm -rf ./dist",
18-
"clean:test": "rm -rf ./dist-test",
19-
"compile": "tsc -p tsconfig.json && tsx tasks/index.ts compile",
20-
"compile:test": "tsc -p tsconfig.test.json && tsx tasks/index.ts compile",
17+
"compile": "tsc -p tsconfig.json && yarn run task:compile",
2118
"lint": "eslint . --ext .ts --ignore-path ../../.eslintignore",
2219
"prepare": "yarn build",
2320
"prepublishOnly": "yarn test && yarn lint",
24-
"pretest": "yarn build:test",
25-
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest"
21+
"task:compile": "tsx tasks/index.ts compile",
22+
"pretest": "yarn run task:compile",
23+
"test": "vitest run"
2624
},
2725
"dependencies": {
2826
"@bitauth/libauth": "^3.1.0-next.8",
29-
"cashc": "^0.12.0",
30-
"cashscript": "^0.12.0",
27+
"cashc": "^0.12.1",
28+
"cashscript": "^0.12.1",
3129
"url-join": "^5.0.0"
3230
},
3331
"devDependencies": {
34-
"@jest/globals": "^29.7.0",
35-
"@types/jest": "^29.5.14",
36-
"jest": "^29.7.0",
3732
"tsx": "^4.20.3",
38-
"typescript": "^5.9.2"
33+
"typescript": "^5.9.2",
34+
"vitest": "^4.0.15"
3935
}
4036
}

0 commit comments

Comments
 (0)