Skip to content

Commit 6ab8a0a

Browse files
committed
test(rollup-plugin-import-meta-assets): update tests
1 parent 25bdafb commit 6ab8a0a

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

packages/rollup-plugin-import-meta-assets/test/snapshots/different-asset-levels-bundle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const nameOne = 'one-name';
2-
const imageOne = new URL(new URL('assets/one-deep-d40c1b4b.svg', import.meta.url).href, import.meta.url).href;
2+
const imageOne = new URL(new URL('assets/one-deep-d40c1b4b.svg', import.meta.url).href).href;
33

44
const nameTwo = 'two-name';
5-
const imageTwo = new URL(new URL('assets/two-deep-e73b0d96.svg', import.meta.url).href, import.meta.url).href;
5+
const imageTwo = new URL(new URL('assets/two-deep-e73b0d96.svg', import.meta.url).href).href;
66

77
const nameThree = 'three-name';
8-
const imageThree = new URL(new URL('assets/three-deep-801763e8.svg', import.meta.url).href, import.meta.url).href;
8+
const imageThree = new URL(new URL('assets/three-deep-801763e8.svg', import.meta.url).href).href;
99

1010
const nameFour = 'four-name';
11-
const imageFour = new URL(new URL('assets/four-deep-c65478aa.svg', import.meta.url).href, import.meta.url).href;
11+
const imageFour = new URL(new URL('assets/four-deep-c65478aa.svg', import.meta.url).href).href;
1212

1313
console.log({
1414
[nameOne]: imageOne,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
const nameFour = 'four-name';
2-
const imageFour = new URL(new URL('assets/four-b40404a7.svg', import.meta.url).href, import.meta.url).href;
2+
const imageFour = new URL(new URL('assets/four-b40404a7.svg', import.meta.url).href).href;
33

44
export { imageFour, nameFour };

packages/rollup-plugin-import-meta-assets/test/snapshots/multi-level-bundle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const nameOne = 'one-name';
2-
const imageOne = new URL(new URL('assets/one-134aaf72.svg', import.meta.url).href, import.meta.url).href;
2+
const imageOne = new URL(new URL('assets/one-134aaf72.svg', import.meta.url).href).href;
33

44
const nameTwo = 'two-name';
5-
const imageTwo = new URL(new URL('assets/two-e4de930c.svg', import.meta.url).href, import.meta.url).href;
5+
const imageTwo = new URL(new URL('assets/two-e4de930c.svg', import.meta.url).href).href;
66

77
const nameThree = 'three-name';
8-
const imageThree = new URL(new URL('assets/three-3f2c16b3.svg', import.meta.url).href, import.meta.url).href;
8+
const imageThree = new URL(new URL('assets/three-3f2c16b3.svg', import.meta.url).href).href;
99

1010
const nameFour = 'four-name';
11-
const imageFour = new URL(new URL('assets/four-b40404a7.svg', import.meta.url).href, import.meta.url).href;
11+
const imageFour = new URL(new URL('assets/four-b40404a7.svg', import.meta.url).href).href;
1212

1313
console.log({
1414
[nameOne]: imageOne,

packages/rollup-plugin-import-meta-assets/test/snapshots/simple-bundle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const justUrlObject = new URL(new URL('assets/one-134aaf72.svg', import.meta.url).href, import.meta.url);
2-
const href = new URL(new URL('assets/two-e4de930c.svg', import.meta.url).href, import.meta.url).href;
3-
const pathname = new URL(new URL('assets/three-3f2c16b3.svg', import.meta.url).href, import.meta.url).pathname;
4-
const searchParams = new URL(new URL('assets/four-b40404a7.svg', import.meta.url).href, import.meta.url).searchParams;
1+
const justUrlObject = new URL(new URL('assets/one-134aaf72.svg', import.meta.url).href);
2+
const href = new URL(new URL('assets/two-e4de930c.svg', import.meta.url).href).href;
3+
const pathname = new URL(new URL('assets/three-3f2c16b3.svg', import.meta.url).href).pathname;
4+
const searchParams = new URL(new URL('assets/four-b40404a7.svg', import.meta.url).href).searchParams;
55

66
console.log({
77
justUrlObject,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
const nameThree = 'three-name';
2-
const imageThree = new URL(new URL('assets/three-3f2c16b3.svg', import.meta.url).href, import.meta.url).href;
2+
const imageThree = new URL(new URL('assets/three-3f2c16b3.svg', import.meta.url).href).href;
33

44
export { imageThree, nameThree };

packages/rollup-plugin-import-meta-assets/test/snapshots/transform-bundle-ignored.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const justUrlObject = new URL(new URL('assets/one-d81655b9.svg', import.meta.url).href, import.meta.url);
2-
const href = new URL(new URL('assets/two-00516e7a.svg', import.meta.url).href, import.meta.url).href;
3-
const pathname = new URL(new URL('assets/three-0ba6692d.svg', import.meta.url).href, import.meta.url).pathname;
4-
const searchParams = new URL(new URL('assets/four-a00e2e1d.svg', import.meta.url).href, import.meta.url).searchParams;
1+
const justUrlObject = new URL(new URL('assets/one-d81655b9.svg', import.meta.url).href);
2+
const href = new URL(new URL('assets/two-00516e7a.svg', import.meta.url).href).href;
3+
const pathname = new URL(new URL('assets/three-0ba6692d.svg', import.meta.url).href).pathname;
4+
const searchParams = new URL(new URL('assets/four-a00e2e1d.svg', import.meta.url).href).searchParams;
55
const someJpg = new URL('./image.jpg', import.meta.url);
66

77
console.log({

packages/rollup-plugin-import-meta-assets/test/snapshots/transform-bundle.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const justUrlObject = new URL(new URL('assets/one-d81655b9.svg', import.meta.url).href, import.meta.url);
2-
const href = new URL(new URL('assets/two-00516e7a.svg', import.meta.url).href, import.meta.url).href;
3-
const pathname = new URL(new URL('assets/three-0ba6692d.svg', import.meta.url).href, import.meta.url).pathname;
4-
const searchParams = new URL(new URL('assets/four-a00e2e1d.svg', import.meta.url).href, import.meta.url).searchParams;
5-
const someJpg = new URL(new URL('assets/image-d6eb190c.jpg', import.meta.url).href, import.meta.url);
1+
const justUrlObject = new URL(new URL('assets/one-d81655b9.svg', import.meta.url).href);
2+
const href = new URL(new URL('assets/two-00516e7a.svg', import.meta.url).href).href;
3+
const pathname = new URL(new URL('assets/three-0ba6692d.svg', import.meta.url).href).pathname;
4+
const searchParams = new URL(new URL('assets/four-a00e2e1d.svg', import.meta.url).href).searchParams;
5+
const someJpg = new URL(new URL('assets/image-d6eb190c.jpg', import.meta.url).href);
66

77
console.log({
88
justUrlObject,

0 commit comments

Comments
 (0)