forked from rollup/rollup-docs-cn
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow the name of Rollup Error to be modified (#5240)
Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
- Loading branch information
1 parent
ac32f83
commit ef3be44
Showing
5 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/cli/samples/handles-uncaught-errors-under-watch/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { assertIncludes } = require('../../../utils.js'); | ||
|
||
module.exports = defineTest({ | ||
description: 'handles uncaught errors under watch', | ||
command: 'rollup --config rollup.config.js -w', | ||
error: () => true, | ||
stderr(stderr) { | ||
assertIncludes(stderr, 'Uncaught RollupError: LOL'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
assert.equal( 42, 42 ); |
16 changes: 16 additions & 0 deletions
16
test/cli/samples/handles-uncaught-errors-under-watch/rollup.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
input: 'main.js', | ||
output: { | ||
format: 'es' | ||
}, | ||
plugins: [ | ||
{ | ||
name: 'test', | ||
buildStart() { | ||
Promise.resolve().then(() => { | ||
this.error('LOL'); | ||
}); | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters