diff --git a/CHANGELOG.md b/CHANGELOG.md index ae43a38a..4c80870b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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_ diff --git a/README.md b/README.md index 211580cd..6d929076 100644 --- a/README.md +++ b/README.md @@ -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( diff --git a/package.json b/package.json index e776154e..365cfb75 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/package.json b/tests/package.json index 273a4b1a..c74f5633 100644 --- a/tests/package.json +++ b/tests/package.json @@ -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" } diff --git a/tests/tests-ava/spec/esmock.ava.spec.js b/tests/tests-ava/spec/esmock.ava.spec.js index 5ae1cf64..b78aa7f3 100644 --- a/tests/tests-ava/spec/esmock.ava.spec.js +++ b/tests/tests-ava/spec/esmock.ava.spec.js @@ -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)))