Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bundler tests assertions on windows #9333

Merged
merged 3 commits into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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