feat: setup jest and typescript

This commit is contained in:
Aravinth Manivannan 2023-09-18 17:56:31 +05:30
parent 9c96169b3d
commit 9dddd75b86
Signed by: realaravinth
GPG key ID: F8F50389936984FF
5 changed files with 1250 additions and 53 deletions

5
.gitignore vendored
View file

@ -9,3 +9,8 @@ node_modules
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
__pycache__/
src/secrets/**
dist/
out/
secrets/
coverage/

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
18

5
jest.config.ts Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
},
};

View file

@ -4,6 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"build": "swc ./src/api.ts -o dist/api.js",
"test": "jest",
"doc": "jsdoc ./src/api.js"
},
@ -11,7 +12,17 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@jest/globals": "^29.7.0",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.85",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.5",
"@types/node": "^20.6.2",
"jest": "^29.7.0",
"jsdoc": "^4.0.2"
"jsdoc": "^4.0.2",
"jsdom": "^22.1.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
}
}

File diff suppressed because it is too large Load diff