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 f23550b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 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,8 @@ describe('scope hoisting', function() {
path.join(__dirname, '/dist/a.js'),
'utf8'
);
assert(contents.includes('add'));
assert(!contents.includes('sub'));
assert(/.\+./.test(contents));
assert(!/.-./.test(contents));
});

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

0 comments on commit f23550b

Please sign in to comment.