Skip to content

Commit

Permalink
Get rid of jest, chai - use vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Aug 21, 2024
1 parent 4eef762 commit 17122a6
Show file tree
Hide file tree
Showing 9 changed files with 10,082 additions and 13,804 deletions.
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"editor.formatOnSave": true,
"files.autoSave": "onFocusChange",
"rust-analyzer.checkOnSave.command": "clippy",

"search.exclude": {
"**/.git": true,
"**/node_modules": true,
Expand All @@ -25,9 +24,6 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"jest.enableInlineErrorMessages": true,
"jest.showCoverageOnLoad": true,
"jest.runAllTestsFirst": false,
"eslint.workingDirectories": [
"./data-browser",
"./react",
Expand Down
1 change: 0 additions & 1 deletion browser/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = {
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
parserOptions: {
Expand Down
16 changes: 0 additions & 16 deletions browser/data-browser/jest.config.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion browser/data-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"predeploy": "build && touch build/.nojekyll",
"preview": "vite preview",
"start": "vite",
"test": "jest",
"test": "vitest run",
"typecheck": "pnpm exec tsc --noEmit"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { reorderArray } from './reorderArray';
import { expect } from 'chai';
import { describe, it, expect } from 'vitest';

describe('reorderArray', () => {
it('reorders ', async () => {
it('reorders elements correctly', () => {
const start = [0, 1, 2, 3, 4];
const out = reorderArray(start, 2, 3);
const expected = [0, 1, 3, 2, 4];
expect(out).to.deep.equal(expected);
expect(out).toEqual(expected);
});
});
3 changes: 0 additions & 3 deletions browser/lib/src/commit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import {
} from './commit.js';
import { Store } from './store.js';

// These are disabled for now, as they require TextEncoder to be available
// https://github.com/facebook/jest/issues/9983

describe('Commit signing and keys', () => {
const privateKey = 'CapMWIhFUT+w7ANv9oCPqrHrwZpkP2JhzF9JnyT6WcI=';
const publicKey = '7LsjMW5gOfDdJzK/atgjQ1t20J/rw8MjVg6xwqm+h8U=';
Expand Down
9 changes: 1 addition & 8 deletions browser/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
{
"devDependencies": {
"@esm-bundle/chai": "4.3.4",
"@jest/globals": "^29.3.1",
"@types/chai": "^4.2.22",
"@types/jest": "^27.0.2",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"chai": "^4.3.4",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^8.0.3",
"jest": "^29.0.2",
"netlify-cli": "16.2.0",
"prettier": "3.2.5",
"prettier-plugin-jsdoc": "^1.3.0",
"ts-jest": "^29.0.1",
"typedoc": "^0.25.3",
"typedoc-plugin-missing-exports": "^2.1.0",
"typescript": "^5.4.5",
"vite": "^5.0.12",
"eslint-plugin-import": "^2.26.0"
"vitest": "^0.34.6"
},
"name": "@tomic/root",
"version": "0.39.0",
Expand Down
Loading

0 comments on commit 17122a6

Please sign in to comment.