diff --git a/test/mock/minify/demo.js b/test/mock/minify/demo.js index 473450ee..de949b3d 100644 --- a/test/mock/minify/demo.js +++ b/test/mock/minify/demo.js @@ -7,6 +7,7 @@ function callback() { block comment */ +/* v8 ignore next 3 */ function other() { } diff --git a/test/mock/src/ignore.js b/test/mock/src/ignore.js new file mode 100644 index 00000000..bf4990bf --- /dev/null +++ b/test/mock/src/ignore.js @@ -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 }; diff --git a/test/mock/src/index.js b/test/mock/src/index.js index 7eb29178..d1df4432 100644 --- a/test/mock/src/index.js +++ b/test/mock/src/index.js @@ -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';