Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# changelog

* 2.7.3 _???.??.2025_
* 2.7.3 _Sep.12.2025_
* drop node version [18 and 20 from tests.](https://github.com/iambumblehead/esmock/pull/326)
* increment some dependencies [and reduce audit warnings.](https://github.com/iambumblehead/esmock/pull/327)
* restore [ava and all other disabled test-runner tests](https://github.com/iambumblehead/esmock/pull/328)
* 2.7.2 _Sep.01.2025_
* [increment resolvewithplus,](https://github.com/iambumblehead/esmock/pull/325) match [exact export paths,](https://github.com/iambumblehead/resolvewithplus/pull/71) thanks @matz3
* 2.7.1 _Jul.01.2025_
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

_**Note: For versions of node prior to v20.6.0,** "--loader" command line arguments must be used with `esmock` as demonstrated [in the wiki.][4] Current versions of node do not require "--loader"._

_**Note: due to --loader issues,** support for `ava` and `jest` are dropped._

`esmock` has the below signature
```js
await esmock(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "esmock",
"type": "module",
"version": "2.7.2",
"version": "2.7.3",
"license": "ISC",
"readmeFilename": "README.md",
"description": "provides native ESM import and globals mocking for unit tests",
Expand Down
25 changes: 11 additions & 14 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,18 @@
"install:all": "node --version && npm install && npm-run-all install:test*",
"test:test-uvu": "cd tests-uvu && npm test",
"test:test-mocha": "cd tests-mocha && npm test",
"test-dropped:test-ava": "cd tests-ava && npm test",
"test:test-ava": "cd tests-ava && npm test",
"test:test-tsx": "cd tests-tsx && npm test",
"test-dropped:test-swc": "cd tests-swc && npm test",
"test:node19-tsm": " cd tests-tsm && npm test",
"test:node18-test-tsm": "npm run isnodenight || npm run test:node19-tsm",
"test:node18-test-tsx": "cd tests-tsx && npm run test",
"test:node18-test-node": "cd tests-node && npm test",
"test-dropped:node18-test-jest": "cd tests-jest && npm test",
"test-dropped:node18-test-jest-ts": "cd tests-jest-ts && npm test",
"test:node18-test-nodets": "cd tests-nodets && npm test",
"test-dropped:node18-test-source-map": "cd tests-source-map && npm test",
"test:node18-test-no-loader": "cd tests-no-loader && npm test",
"test:node18-test-workspaces": "cd tests-workspaces && npm test",
"test:node18:all": "npm run isnodelt18 || npm-run-all test:node18-test*",
"test:all": "npm-run-all test:test* && npm run test:node18:all",
"test:test-swc": "cd tests-swc && npm test",
"test:test-tsm": "cd tests-tsm && npm test",
"test:test-node": "cd tests-node && npm test",
"test:test-jest": "cd tests-jest && npm test",
"test:test-jest-ts": "cd tests-jest-ts && npm test",
"test:test-nodets": "cd tests-nodets && npm test",
"test:test-source-map": "cd tests-source-map && npm test",
"test:test-no-loader": "cd tests-no-loader && npm test",
"test:test-workspaces": "cd tests-workspaces && npm test",
"test:all": "npm-run-all test:test*",
"test:all-cover": "c8 --src=../src/* npm run test:all",
"test:all-ci": "npm run mini && npm run test:all"
}
Expand Down
6 changes: 4 additions & 2 deletions tests/tests-ava/spec/esmock.ava.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,10 @@ test('should have small querystring in stacktrace filename, deep2', async t => {
causeDeepErrorParent()
} catch (e) {
// newer versions auto-strip querystring from subsequent paths
if (' 18. 2' < process.versions.node.split('.')
.slice(0, 2).map(s => s.padStart(3)).join('.')) {
const [major, minor] = process.versions.node
.split('.').map(it => +it)
const isLT1812 = major < 18 || (major === 18 && minor < 2)
if (isLT1812) {
t.true(
e.stack.split('\n')
.every(line => !line.includes('?') || /\?esmk=\d/.test(line)))
Expand Down
Loading