Skip to content

Commit

Permalink
Use jest as dev dependency to test package
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindrics committed Jun 11, 2024
1 parent 17d39e5 commit 236ebc7
Show file tree
Hide file tree
Showing 4 changed files with 5,288 additions and 1,328 deletions.
13 changes: 13 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-typescript"
]
}
11 changes: 11 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
preset: "ts-jest/presets/js-with-babel",
testEnvironment: "node",
transform: {
"^.+\\.[tj]sx?$": "babel-jest",
},
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
testMatch: ["**/?(*.)+(test).[tj]s?(x)"],
};
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"predev": "run-s clean",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest"
},
"keywords": [
"aws",
Expand Down Expand Up @@ -59,8 +59,16 @@
"ora": "^6.1.2"
},
"devDependencies": {
"@babel/core": "^7.24.6",
"@babel/preset-env": "^7.24.6",
"@babel/preset-typescript": "^7.24.6",
"@types/jest": "^29.5.12",
"@types/node": "^18.11.18",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"js-with-babel": "link:ts-jest/presets/js-with-babel",
"npm-run-all": "^4.1.5",
"ts-jest": "^29.1.4",
"ts-node": "^10.9.1",
"tsup": "^6.5.0",
"typescript": "^4.9.4"
Expand Down
Loading

0 comments on commit 236ebc7

Please sign in to comment.