Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 04e7bd6

Browse files
committed
Fixed a test inconsistency.
1 parent 4ecc631 commit 04e7bd6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,10 @@ module.exports = ({descriptionPrefix, webpack, HtmlWebpackPlugin}) => {
357357
expect(links.length).toBe(2);
358358
expect(links[0].getAttribute('rel')).toBe('prefetch');
359359
expect(links[0].hasAttribute('as')).toBeFalsy();
360-
expect(links[0].getAttribute('href')).toContain('0.js');
360+
// There's a difference in the output when run in webpack v3 and v4.
361+
// v3 has compilation.chunks[0].files: ['0.js']
362+
// v4 has compilation.chunks[0].files: ['home.js']
363+
expect(['0.js', 'home.js']).toContain(links[0].getAttribute('href'));
361364
expect(links[1].getAttribute('rel')).toBe('prefetch');
362365
expect(links[1].hasAttribute('as')).toBeFalsy();
363366
expect(links[1].getAttribute('href')).toBe('main.js');

0 commit comments

Comments
 (0)