Skip to content

Commit 728e676

Browse files
committed
add debug logging for processed scripts for testing
1 parent 4d1f5f9 commit 728e676

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/processScript/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ export async function processScript(code: string, {
416416
}
417417

418418
if (import.meta.vitest) {
419+
const DEBUG_LOG_PROCESSED_SCRIPTS = false
419420
const TESTS_FOLDER = `game-scripts-tests`
420421

421422
const { test, expect } = import.meta.vitest
@@ -436,6 +437,9 @@ if (import.meta.vitest) {
436437

437438
for (const { filePath, script, warnings } of testFiles) {
438439
test(filePath, () => {
440+
if (DEBUG_LOG_PROCESSED_SCRIPTS)
441+
console.debug(`${filePath} processed script:\n${script}`)
442+
439443
expect(warnings.length).toBe(0);
440444
(0, eval)(`(${script})`)(import.meta.vitest)
441445
})

0 commit comments

Comments
 (0)