Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve rolldown test #684

Merged
merged 1 commit into from Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/rolldown/tests/fixture.test.ts
Expand Up @@ -25,8 +25,6 @@ function main() {
return
}

// FIXME: This empty log is here to make vitest shows stdout/stderr content made from rust. Wonder why.
console.log()
try {
const output = await compileFixture(
nodePath.dirname(testConfigPath),
Expand All @@ -36,8 +34,7 @@ function main() {
testConfig.afterTest(output)
}
} catch (err) {
console.log(`Failed in ${testConfigPath}`)
throw err
throw new Error(`Failed in ${testConfigPath}`, { cause: err })
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion packages/rolldown/tsconfig.json
Expand Up @@ -18,7 +18,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
Expand Down
2 changes: 2 additions & 0 deletions packages/rolldown/vitest.config.mts
Expand Up @@ -4,6 +4,8 @@ import nodePath from 'node:path'
export default defineConfig({
test: {
testTimeout: 20000,
// Disabled, Because the error printed by rust cannot be seen
disableConsoleIntercept: true,
},
resolve: {
alias: {
Expand Down