Skip to content

Commit

Permalink
Make test meaningfull
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Dec 15, 2018
1 parent d63a46e commit c2de4d4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/parcel-bundler/test/scope-hoisting.js
Expand Up @@ -433,12 +433,13 @@ describe('scope hoisting', function() {
assert(!contents.includes('bar'));
});

it('removes unused function exports', async function() {
it('removes unused function exports when minified', async function() {
let b = await bundle(
path.join(
__dirname,
'/integration/scope-hoisting/es6/tree-shaking-functions/a.js'
)
),
{minify: true}
);

let output = await run(b);
Expand All @@ -448,8 +449,9 @@ describe('scope hoisting', function() {
path.join(__dirname, '/dist/a.js'),
'utf8'
);
assert(contents.includes('add'));
assert(!contents.includes('sub'));
console.log(contents);
assert(/.\+./.test(contents));
assert(!/.\-./.test(contents));
});

it('support exporting a ES6 module exported as CommonJS', async function() {
Expand Down

0 comments on commit c2de4d4

Please sign in to comment.