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
implement validate
output option and --validate
CLI option
#3952
Conversation
@@ -47,7 +47,8 @@ runTestSuiteWithSamples('form', path.resolve(__dirname, 'samples'), (dir, config | |||
{ | |||
exports: 'auto', | |||
file: inputFile, | |||
format: defaultFormat | |||
format: defaultFormat, | |||
// validate: true // add when systemjs bugs fixed |
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.
Commented out to pass tests.
Enable validation here to see the issues related to:
test/form/samples/system-export-compact/_expected.js
test/form/samples/system-multiple-export-bindings/_expected.js
test/form/samples/no-external-live-bindings-compact/_expected/system.js
Codecov Report
@@ Coverage Diff @@
## master #3952 +/- ##
=======================================
Coverage 97.19% 97.19%
=======================================
Files 191 191
Lines 6694 6703 +9
Branches 1958 1960 +2
=======================================
+ Hits 6506 6515 +9
Misses 99 99
Partials 89 89
Continue to review full report at Codecov.
|
* optionally verifies the generated output by parsing it with acorn * disabled by default * enable the validate option in the majority of tests * increase mocha test timeout due to circleci node-v14-latest
Thanks, while it may not be useful often, this could also serve as a helper option for plugin developers, so I decided to merge this. I extended the documentation and slightly refined the error generation and tests. |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
#3951 (comment)
Description
#3951 brought to light that a few of the test cases have ill-formed output in the rollup test suite. This PR is an attempt to prevent that from happening in the future. The
validate
option can also give users an extra bit of confidence that there are no syntax errors in their rollup generated bundles.