Skip to content

Commit a389e7e

Browse files
author
LongYinan
committed
ci: fix assertion in simple tests
1 parent 7fd6dbf commit a389e7e

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
run: yarn build:ts
233233

234234
- name: Run simple tests
235-
run: docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/node-rs -w /node-rs node:${{ matrix.node }}-alpine sh -c "./node_modules/.bin/lerna run test:simple --stream"
235+
run: docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/node-rs -w /node-rs node:${{ matrix.node }}-alpine sh -c "node ./scripts/simple-tests.js"
236236

237237
publish:
238238
name: Publish

packages/bcrypt/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"scripts": {
2525
"bench": "cross-env NODE_ENV=production node benchmark/bcrypt.js",
2626
"build": "napi --release ./bcrypt",
27-
"build:debug": "napi ./bcrypt.debug",
28-
"test:simple": "node ./simple-test.js"
27+
"build:debug": "napi ./bcrypt.debug"
2928
},
3029
"bugs": {
3130
"url": "https://github.com/Brooooooklyn/node-rs/issues"

packages/crc32/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"scripts": {
2525
"bench": "cross-env NODE_ENV=production node benchmark/crc32.js",
2626
"build": "napi --release ./crc32",
27-
"build:debug": "napi ./index",
28-
"test:simple": "node ./simple-test.js"
27+
"build:debug": "napi ./index"
2928
},
3029
"bugs": {
3130
"url": "https://github.com/Brooooooklyn/node-rs/issues"

packages/crc32/simple-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { crc32 } = require('./index')
22

3-
console.assert(crc32('hello') === '907060870')
3+
console.assert(crc32('hello') === 907060870)
44

55
console.info('crc32 simple test passed')

packages/jieba/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"scripts": {
2525
"bench": "cross-env NODE_ENV=production node benchmark/jieba.js",
2626
"build": "napi --release ./jieba",
27-
"build:debug": "napi ./jieba",
28-
"test:simple": "node ./simple-test.js"
27+
"build:debug": "napi ./jieba"
2928
},
3029
"bugs": {
3130
"url": "https://github.com/Brooooooklyn/node-rs/issues"

scripts/simple-tests.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const packages = require('./packages')
2+
3+
for (const pkg of packages) {
4+
require(`../packages/${pkg}/simple-test.js`)
5+
}

0 commit comments

Comments
 (0)