Skip to content

Commit

Permalink
Remove unnecessarily strict assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Aug 11, 2022
1 parent bc31bd2 commit 46134dd
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions packages/core/integration-tests/test/scope-hoisting.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {createWorkerFarm} from '@parcel/core';
import {md} from '@parcel/diagnostic';
import {
assertBundles,
assertDependencyWasExcluded,
bundle as _bundle,
bundler as _bundler,
distDir,
Expand Down Expand Up @@ -2441,12 +2440,6 @@ describe('scope hoisting', function () {
let output = await run(bundleEvent.bundleGraph);
assert.deepEqual(output, [123]);

assertDependencyWasExcluded(
bundleEvent.bundleGraph,
'a.js',
'./c.js',
);

await overlayFS.copyFile(
path.join(testDir, 'index.2.js'),
path.join(testDir, 'index.js'),
Expand Down Expand Up @@ -2674,18 +2667,6 @@ describe('scope hoisting', function () {
),
new Set(['gridSize']),
);
assert.deepStrictEqual(
new Set(
bundleEvent.bundleGraph.getUsedSymbols(
findDependency(
bundleEvent.bundleGraph,
'theme.js',
'./themeColors',
),
),
),
new Set(),
);
assert(!findAsset(bundleEvent.bundleGraph, 'themeColors.js'));

await overlayFS.copyFile(
Expand Down Expand Up @@ -2725,6 +2706,7 @@ describe('scope hoisting', function () {
),
new Set('*'),
);
assert(findAsset(bundleEvent.bundleGraph, 'themeColors.js'));

await overlayFS.copyFile(
path.join(testDir, 'index.1.js'),
Expand All @@ -2748,18 +2730,7 @@ describe('scope hoisting', function () {
),
new Set(['gridSize']),
);
assert.deepStrictEqual(
new Set(
bundleEvent.bundleGraph.getUsedSymbols(
findDependency(
bundleEvent.bundleGraph,
'theme.js',
'./themeColors',
),
),
),
new Set(),
);
assert(!findAsset(bundleEvent.bundleGraph, 'themeColors.js'));
} finally {
await subscription.unsubscribe();
}
Expand Down

0 comments on commit 46134dd

Please sign in to comment.