Skip to content

Commit 9d80b4d

Browse files
committed
test: turn on debug mode via env var
1 parent d0d5840 commit 9d80b4d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/quickjs-emscripten/src/quickjs.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,28 @@ import {
4444
newVariant,
4545
shouldInterruptAfterDeadline,
4646
Scope,
47+
setDebugMode,
4748
} from "."
4849

4950
const TEST_SLOW = !process.env.TEST_FAST
5051
const TEST_NG = TEST_SLOW && !process.env.TEST_NO_NG
5152
const TEST_DEBUG = TEST_SLOW && !process.env.TEST_NO_DEBUG
5253
const TEST_ASYNC = TEST_SLOW && !process.env.TEST_NO_ASYNC
5354
const TEST_RELEASE = !process.env.TEST_NO_RELEASE
55+
const DEBUG = Boolean(process.env.DEBUG)
5456
console.log("test sets:", {
5557
TEST_RELEASE,
5658
TEST_DEBUG,
5759
TEST_NG,
5860
TEST_ASYNC,
5961
TEST_SLOW,
62+
DEBUG,
6063
})
6164

65+
if (DEBUG) {
66+
setDebugMode(true)
67+
}
68+
6269
type GetTestContext = (options?: ContextOptions) => Promise<QuickJSContext>
6370

6471
const baseIt = it

0 commit comments

Comments
 (0)