Set up Jest

This commit is contained in:
Elian Doran 2024-05-06 21:45:22 +03:00
parent a68b75f069
commit 64146c8990
No known key found for this signature in database
4 changed files with 4570 additions and 20 deletions

5
jest.config.js Normal file
View File

@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node'
};

4576
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,12 +31,14 @@
"test-jasmine": "TRILIUM_DATA_DIR=~/trilium/data-test jasmine",
"test-es6": "node -r esm spec-es6/attribute_parser.spec.js ",
"test": "npm run test-jasmine && npm run test-es6",
"jest": "jest **/*/*.test.ts",
"postinstall": "rimraf ./node_modules/canvas"
},
"dependencies": {
"@braintree/sanitize-url": "6.0.4",
"@electron/remote": "2.1.2",
"@excalidraw/excalidraw": "0.17.3",
"@types/jest": "^29.5.12",
"archiver": "7.0.0",
"async-mutex": "0.4.1",
"axios": "1.6.7",
@ -142,10 +144,12 @@
"electron-rebuild": "3.2.9",
"esm": "3.2.25",
"jasmine": "5.1.0",
"jest": "^29.7.0",
"jsdoc": "4.0.2",
"lorem-ipsum": "2.0.8",
"nodemon": "3.1.0",
"rcedit": "4.0.1",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
@ -155,4 +159,4 @@
"optionalDependencies": {
"electron-installer-debian": "3.2.0"
}
}
}

View File

@ -8,7 +8,8 @@
"noImplicitAny": true,
"resolveJsonModule": true,
"lib": ["ES2022"],
"downlevelIteration": true
"downlevelIteration": true,
"esModuleInterop": true
},
"include": [
"./src/**/*.js",