Skip to content

Commit

Permalink
add ignore test
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jan 3, 2024
1 parent d749c6d commit 604caaf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/mock/minify/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function callback() {
block comment
*/

/* v8 ignore next 3 */
function other() {

}
Expand Down
33 changes: 33 additions & 0 deletions test/mock/src/ignore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

const platform = 'wind32';

/* v8 ignore next */
if (platform === 'darwin') {
console.info('hello darwin');
}


/* v8 ignore next 3 */
if (platform === 'linux') {
console.info('hello linux');
}


const os = platform === 'wind32' ? 'Windows' /* v8 ignore next */ : 'Other';

/* v8 ignore start */
function uncovered(v) {
console.log(os);
}

/* v8 ignore stop */

const ignore = () => {
const v = 1;

/* v8 ignore start */
uncovered(v);
};


export { ignore };
1 change: 1 addition & 0 deletions test/mock/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import '../minify/comments.js';
import '../minify/demo.js';

import './ignore.js';
import branch from './branch.js';
import ts from './typescript.ts';

Expand Down

0 comments on commit 604caaf

Please sign in to comment.