Skip to content

Commit

Permalink
Fix bundler tests assertions on windows (#9333)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcompiles authored Oct 23, 2023
1 parent bb7ff69 commit 5b2f1b7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/core/integration-tests/test/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
run,
} from '@parcel/test-utils';
import {hashString} from '@parcel/rust';
import {normalizePath} from '@parcel/utils';

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 @@ -1522,9 +1523,12 @@ describe('bundler', function () {
},
]);

let targetDistDir = __dirname.replace('/test', '/dist');
let targetDistDir = normalizePath(path.join(__dirname, '../dist'));
let hashedIdWithMSB = hashString('bundle:' + 'vendorjs' + targetDistDir);
assert(b.getBundles().find(b => b.id == hashedIdWithMSB));
assert(
b.getBundles().find(b => b.id == hashedIdWithMSB),
'MSB id does not match expected',
);
});

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

let targetDistDir = __dirname.replace('/test', '/dist');
let targetDistDir = normalizePath(path.join(__dirname, '../dist'));
let hashedIdWithMSB = hashString('bundle:' + 'vendorjs' + targetDistDir);
assert(b.getBundles().find(b => b.id == hashedIdWithMSB));
assert(
b.getBundles().find(b => b.id == hashedIdWithMSB),
'MSB id does not match expected',
);

await run(b);
});
Expand Down

0 comments on commit 5b2f1b7

Please sign in to comment.