Skip to content

Commit

Permalink
chore: improve stdout/stderr output of rolldown tests (#684)
Browse files Browse the repository at this point in the history
Co-authored-by: Yunfei <i.heyunfei@gmail.com>
  • Loading branch information
Dunqing and hyf0 committed Mar 28, 2024
1 parent 453e996 commit 0729dfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
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

0 comments on commit 0729dfb

Please sign in to comment.