Skip to content

Commit

Permalink
turn off ttylog
Browse files Browse the repository at this point in the history
  • Loading branch information
justjake committed Sep 3, 2024
1 parent 8e9a43f commit 559018c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/quickjs-emscripten/src/quickjs-in-quickjs-node-test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ import assert from "node:assert"
import { getQuickJS } from "./index.js"
import type { JSModuleLoader, JSModuleNormalizer, QuickJSHandle, QuickJSContext } from "./index.js"

const DEBUG = false

const ttyLog = (...args: unknown[]) => {
const fd = fs.openSync("/dev/tty", "w")
fs.writeSync(fd, util.format(...args) + "\n")
fs.closeSync(fd)
if (DEBUG) {
const fd = fs.openSync("/dev/tty", "w")
fs.writeSync(fd, util.format(...args) + "\n")
fs.closeSync(fd)
}
}

const QuickJS = await getQuickJS()
Expand Down

0 comments on commit 559018c

Please sign in to comment.