Skip to content

Commit

Permalink
Merge pull request #1404 from paulmillr/typed-tests
Browse files Browse the repository at this point in the history
test: strongly typed tests
  • Loading branch information
paulmillr authored Jan 23, 2025
2 parents 203fb66 + 8b5b210 commit 7b3e627
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ jobs:
- uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
- run: bun install
- run: bun run build
- run: bun test.mjs
- run: bun index.test.mjs
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
/node_modules/
/test-fixtures/
/*.d.ts
/*.d.mts
/*.map
/index.js
/handler.js
/esm
/esm
/*.test.js
/*.test.mjs
54 changes: 51 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"index.d.ts",
"handler.js",
"handler.d.ts",
"esm"
"esm",
"!**/*.test.*"
],
"main": "./index.js",
"module": "./esm/index.js",
Expand All @@ -29,7 +30,10 @@
},
"devDependencies": {
"@paulmillr/jsbt": "0.2.1",
"@types/chai": "^5.0.1",
"@types/node": "20.14.8",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^4.0.0",
"chai": "4.3.4",
"micro-should": "0.5.0",
"prettier": "3.1.1",
Expand All @@ -54,7 +58,7 @@
"build": "tsc && tsc -p tsconfig.esm.json",
"lint": "prettier --check src",
"format": "prettier --write src",
"test": "node test.mjs"
"test": "node index.test.mjs"
},
"keywords": [
"fs",
Expand Down
Loading

0 comments on commit 7b3e627

Please sign in to comment.