Skip to content

Commit 1210f2c

Browse files
committed
Add test
1 parent 42e647a commit 1210f2c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"build:dev": "yarn clean && yarn build:bindings:configure && yarn build",
3333
"build:tarball": "npm pack",
3434
"clean": "node-gyp clean && rm -rf lib && rm -rf build",
35-
"test": "node ./test/prepare.mjs && vitest run --silent=false --disable-console-intercept"
35+
"test": "yarn test:install && node ./test/prepare.mjs && vitest run --silent=false --disable-console-intercept",
36+
"test:install": "ALWAYS_THROW=true yarn install"
3637
},
3738
"engines": {
3839
"node": ">=18"

scripts/check-build.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ if (fs.existsSync(binaries.target)) {
3939
console.log('Precompiled binary found, skipping build from source.');
4040
} catch (e) {
4141
console.log('Precompiled binary found but failed loading');
42-
console.log(e);
42+
if (process.env.ALWAYS_THROW) {
43+
throw e;
44+
} else {
45+
console.log(e);
46+
}
4347
try {
4448
recompileFromSource();
4549
} catch (e) {

0 commit comments

Comments
 (0)