Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AGawrys committed Oct 18, 2023
1 parent 13648b4 commit 5f6c220
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/core/integration-tests/test/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
fsFixture,
run,
} from '@parcel/test-utils';
import {hashString} from '@parcel/rust';

describe('bundler', function () {
it('should not create shared bundles when a bundle is being reused and disableSharedBundles is enabled', async function () {
Expand Down Expand Up @@ -1520,6 +1521,10 @@ describe('bundler', function () {
assets: ['math.js', 'add.js', 'subtract.js'],
},
]);

let targetDistDir = __dirname.replace('/test', '/dist');
let hashedIdWithMSB = hashString('bundle:' + 'vendorjs' + targetDistDir);
assert(b.getBundles().find(b => b.id == hashedIdWithMSB));
});

it('should support manual shared bundles with constants module', async function () {
Expand Down Expand Up @@ -1655,6 +1660,10 @@ describe('bundler', function () {
},
]);

let targetDistDir = __dirname.replace('/test', '/dist');
let hashedIdWithMSB = hashString('bundle:' + 'vendorjs' + targetDistDir);
assert(b.getBundles().find(b => b.id == hashedIdWithMSB));

await run(b);
});

Expand Down

0 comments on commit 5f6c220

Please sign in to comment.