-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cli: implement --failAfterWarnings flag #3712
Changes from 1 commit
29a9465
03a973a
0429e8e
8e8b372
e0af136
bd9bc8d
e12127f
64c6a9f
429729b
a2c0bdd
0c58941
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { assertIncludes } = require('../../../utils.js'); | ||
|
||
module.exports = { | ||
description: 'errors on warnings with --failAfterWarnings', | ||
command: 'rollup -i main.js --failAfterWarnings', | ||
error: () => true, | ||
stderr: stderr => | ||
assertIncludes(stderr, '[!] Warnings occurred and --failAfterWarnings flag present') | ||
}; |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,5 @@ | ||||
'use strict'; | ||||
|
||||
require('unknown'); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't think this is been checked with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please do. I checked e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case it's because I wasn't returning There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to return Line 42 in 8333387
_expected.js should be compared to stdout, but only if there is no _expected dir, config.test , config.result , config.execute , config.stderr that does not return true or config.error that does not return true .
|
||||
|
||||
console.log(42); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import something from 'unknown'; | ||
|
||
console.log(42); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to extend documentation in the
docs
folder, just check where and how e.g.--enivronment
is documented.