Skip to content

Commit 08a94a5

Browse files
committed
Fixed dev problem on windows + fixed randomly failing test + update
tested node version
1 parent c6a6d6b commit 08a94a5

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
node-version: [12.x, 14.x, 16.x, 18.x, 20.x]
16+
node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 21.x]
1717

1818
steps:
1919
- uses: actions/checkout@v2

package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"test": "npm run lint && npm run coverage",
3939
"coverage": "npm run jest -- --coverage",
4040
"lint": "eslint -c .eslintrc.cjs \"src/**/*.mjs\"",
41-
"jest": "NODE_OPTIONS=--experimental-vm-modules jest",
41+
"jest": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
4242
"docs": "jsdoc -c .jsdoc.json && node dev/docs-collect-version-numbers.cjs"
4343
},
4444
"repository": {
@@ -55,6 +55,7 @@
5555
"@rollup/plugin-commonjs": "^21.0.1",
5656
"@rollup/plugin-node-resolve": "^13.0.6",
5757
"clean-jsdoc-theme": "3.0.3",
58+
"cross-env": "^7.0.3",
5859
"eslint": "^7.32.0",
5960
"eslint-config-standard": "^16.0.3",
6061
"eslint-plugin-compat": "^3.13.0",

src/findInternal.test.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ test('findInternal infinite sync operator', async () => {
8585
i += 1
8686
}
8787
}
88-
sleep(10).then(() => {
89-
shouldStop = true
90-
})
9188
const callList = []
9289
const [index] = await findInternal(infiniteSyncGenerator(), async (v, i) => {
9390
callList.push(i)
9491
await sleep(1)
92+
if (i === 2) {
93+
shouldStop = true
94+
}
9595
return false
9696
}, 1, true)
9797
expect(index).toStrictEqual(-1)

0 commit comments

Comments
 (0)