-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix gulp babili options for comments * add test case * fix lint issue * better test case
- Loading branch information
1 parent
9663c12
commit 269a8f9
Showing
2 changed files
with
62 additions
and
12 deletions.
There are no files selected for viewing
18 changes: 12 additions & 6 deletions
18
packages/gulp-babili/__tests__/__snapshots__/gulp-babili-test.js.snap
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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`gulp-babili comments should remove all comments when false 1`] = `"foo(),bar(),baz();"`; | ||
exports[`gulp-babili comments should remove all comments when false 1`] = `"function foo(){}bar();var a=baz();"`; | ||
|
||
exports[`gulp-babili comments should remove comments by default except license and preserve 1`] = ` | ||
/** | ||
* @license | ||
* This is a test | ||
*/"foo(),bar(),baz();"`; | ||
"/** | ||
* @license | ||
* This is a test | ||
*/function foo(){}bar();var a=baz();" | ||
`; | ||
|
||
exports[`gulp-babili comments should take a custom function 1`] = `"/* YAC - yet another comment */foo(),bar(),baz();"`; | ||
exports[`gulp-babili comments should take a custom function 1`] = `"function foo(){}bar();/* YAC - yet another comment */var a=baz();"`; | ||
|
||
exports[`gulp-babili should remove comments while doing DCE and simplify 1`] = ` | ||
"var a=function(){(function(){foo(),bar(),baz();// comments should be optimized away | ||
})()};" | ||
`; |
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