Skip to content

Commit

Permalink
test: ✅ add integration for tsc against current fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Apr 30, 2024
1 parent b2978c1 commit 4775c43
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/fixtures/integration/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"allowJs": true
}
}
16 changes: 16 additions & 0 deletions tests/integration/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,21 @@ for (const dirent of fs.readdirSync(TEST_FIXTURES_ROOT, {
}
}
})

it("should NOT fail when running tsc", () => {
try {
cp.execSync(`npx tsc`, { cwd: TEST_CWD })

assert.fail("Expect error")
} catch (e: any) {
const result = `${e.stdout}`
try {
assert.equal(result, "undefined")
} catch (e) {
console.error(e)
throw e
}
}
})
})
}

0 comments on commit 4775c43

Please sign in to comment.