Skip to content

Commit

Permalink
replace jest with vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Jan 9, 2024
1 parent 954bdc5 commit edcedbc
Show file tree
Hide file tree
Showing 39 changed files with 868 additions and 2,231 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__tests__
jest.config.json
vitest.config.ts
yarn.lock
.DS_Store
*.log
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022, Mat Sz
Copyright (c) 2022-2024, Mat Sz
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -27,4 +27,4 @@ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.
5 changes: 0 additions & 5 deletions jest.config.js

This file was deleted.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "plist",
"scripts": {
"prepare": "npm run build",
"test": "yarn workspaces foreach -Api run test",
"test": "vitest",
"build": "yarn workspaces foreach -Apti run build",
"lint": "yarn workspaces foreach -Api run lint",
"publish": "yarn workspaces foreach -Apti npm publish --tolerate-republish"
Expand Down Expand Up @@ -35,16 +35,14 @@
"license": "BSD-3-Clause-Clear",
"private": true,
"devDependencies": {
"@types/jest": "^28.1.2",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"eslint": "^8.18.0",
"husky": "^8.0.1",
"jest": "^28.1.1",
"lint-staged": "^13.0.2",
"prettier": "^2.7.1",
"ts-jest": "^28.0.5",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"vitest": "^1.1.3"
},
"packageManager": "[email protected]"
}
8 changes: 8 additions & 0 deletions packages/binary.parse/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/binary.parse/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/binary.parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/binary.parse/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/binary.parse',
test: {
globals: true,
},
}));
8 changes: 8 additions & 0 deletions packages/binary.serialize/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/binary.serialize/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/binary.serialize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/binary.serialize/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/binary.serialize',
test: {
globals: true,
},
}));
2 changes: 0 additions & 2 deletions packages/openstep.parse/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ describe('openstep:parse', () => {
});
});

describe('integration', () => {});

describe('invalid', () => {
it('throws on invalid input', () => {
expect(() => parse('{;}')).toThrow();
Expand Down
8 changes: 8 additions & 0 deletions packages/openstep.parse/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/openstep.parse/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/openstep.parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/openstep.parse/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/openstep.parse',
test: {
globals: true,
},
}));
8 changes: 8 additions & 0 deletions packages/openstep.serialize/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/openstep.serialize/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/openstep.serialize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/openstep.serialize/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/openstep.serialize',
test: {
globals: true,
},
}));
8 changes: 8 additions & 0 deletions packages/parse/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/parse/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/parse/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/parse',
test: {
globals: true,
},
}));
8 changes: 8 additions & 0 deletions packages/serialize/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/serialize/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/serialize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/serialize/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/serialize',
test: {
globals: true,
},
}));
8 changes: 8 additions & 0 deletions packages/xml.parse/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/xml.parse/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/xml.parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/xml.parse/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/xml.parse',
test: {
globals: true,
},
}));
8 changes: 8 additions & 0 deletions packages/xml.serialize/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": ["."],
"exclude": []
}
1 change: 0 additions & 1 deletion packages/xml.serialize/jest.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/xml.serialize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
},
"scripts": {
"prepare": "npm run build",
"test": "jest",
"build": "tsc",
"lint": "eslint src"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/xml.serialize/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineProject } from 'vitest/config';

// https://vitejs.dev/config/
export default defineProject(() => ({
name: '@plist/xml.serialize',
test: {
globals: true,
},
}));
1 change: 1 addition & 0 deletions vitest.workspace.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ['packages/*'];
Loading

0 comments on commit edcedbc

Please sign in to comment.