Skip to content

Commit 83e1988

Browse files
test: update
1 parent 89bb89b commit 83e1988

File tree

6 files changed

+36
-39
lines changed

6 files changed

+36
-39
lines changed

test/__snapshots__/esModule-option.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`'esModule' option should use a CommonJS export by default: errors 1`] =
44

55
exports[`'esModule' option should use a CommonJS export by default: module 1`] = `
66
"// Imports
7-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
7+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
88
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
99
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
1010
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);
@@ -523,7 +523,7 @@ exports[`'esModule' option should use a CommonJS export when the value is "false
523523
524524
exports[`'esModule' option should use a CommonJS export when the value is "false": module 1`] = `
525525
"// Imports
526-
var ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ = require(\\"file:///<cwd>/\\");
526+
var ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ = require(\\"file:///<cwd>//src/runtime/getUrl.js\\");
527527
var ___HTML_LOADER_IMPORT_0___ = require(\\"./image.png\\");
528528
var ___HTML_LOADER_IMPORT_1___ = require(\\"/image.png\\");
529529
var ___HTML_LOADER_IMPORT_2___ = require(\\"aliasImg\\");
@@ -1042,7 +1042,7 @@ exports[`'esModule' option should use an ES module export when the value is "tru
10421042
10431043
exports[`'esModule' option should use an ES module export when the value is "true": module 1`] = `
10441044
"// Imports
1045-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
1045+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
10461046
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
10471047
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
10481048
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);

test/__snapshots__/loader.test.js.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`loader should emit an error on broken HTML syntax: errors 1`] = `Array
44

55
exports[`loader should emit an error on broken HTML syntax: module 1`] = `
66
"// Imports
7-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
7+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
88
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
99
// Module
1010
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -66,7 +66,7 @@ exports[`loader should pass queries to other loader: errors 1`] = `Array []`;
6666
6767
exports[`loader should pass queries to other loader: module 1`] = `
6868
"// Imports
69-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
69+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
7070
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./icons.svg?color=%23BAAFDB%3F\\", import.meta.url);
7171
// Module
7272
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___, { hash: \\"#foo\\" });
@@ -104,7 +104,7 @@ exports[`loader should work with "resolve.roots": errors 1`] = `Array []`;
104104
105105
exports[`loader should work with "resolve.roots": module 1`] = `
106106
"// Imports
107-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
107+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
108108
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"/image2.png\\", import.meta.url);
109109
// Module
110110
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -149,7 +149,7 @@ exports[`loader should work with server-relative url: errors 1`] = `Array []`;
149149
150150
exports[`loader should work with server-relative url: module 1`] = `
151151
"// Imports
152-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
152+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
153153
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"/nested/image3.png\\", import.meta.url);
154154
// Module
155155
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -171,7 +171,7 @@ exports[`loader should work with webpackIgnore comment: errors 1`] = `Array []`;
171171
172172
exports[`loader should work with webpackIgnore comment: module 1`] = `
173173
"// Imports
174-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
174+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
175175
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
176176
// Module
177177
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -305,7 +305,7 @@ exports[`loader should work: errors 1`] = `Array []`;
305305
306306
exports[`loader should work: module 1`] = `
307307
"// Imports
308-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
308+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
309309
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
310310
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
311311
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);

test/__snapshots__/minimize-option.test.js.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`"minimize" option should be turned off by default: errors 1`] = `Array
44

55
exports[`"minimize" option should be turned off by default: module 1`] = `
66
"// Imports
7-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
7+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
88
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
99
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
1010
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);
@@ -523,7 +523,7 @@ exports[`"minimize" option should be turned off in "development" mode: errors 1`
523523
524524
exports[`"minimize" option should be turned off in "development" mode: module 1`] = `
525525
"// Imports
526-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
526+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
527527
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
528528
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
529529
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);
@@ -1042,7 +1042,7 @@ exports[`"minimize" option should be turned on in "production" mode: errors 1`]
10421042
10431043
exports[`"minimize" option should be turned on in "production" mode: module 1`] = `
10441044
"// Imports
1045-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
1045+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
10461046
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
10471047
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
10481048
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);
@@ -1126,7 +1126,7 @@ Parse Error: < img src=\\"image.png\\" >",
11261126
11271127
exports[`"minimize" option should emit an error on broken HTML syntax: module 1`] = `
11281128
"// Imports
1129-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
1129+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
11301130
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
11311131
// Module
11321132
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -1153,7 +1153,7 @@ exports[`"minimize" option should not work with a value equal to "false": errors
11531153
11541154
exports[`"minimize" option should not work with a value equal to "false": module 1`] = `
11551155
"// Imports
1156-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
1156+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
11571157
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
11581158
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
11591159
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);
@@ -1672,7 +1672,7 @@ exports[`"minimize" option should support options for minimizer: errors 1`] = `A
16721672
16731673
exports[`"minimize" option should support options for minimizer: module 1`] = `
16741674
"// Imports
1675-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
1675+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
16761676
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
16771677
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
16781678
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);
@@ -1766,7 +1766,7 @@ exports[`"minimize" option should work with a value equal to "true": errors 1`]
17661766
17671767
exports[`"minimize" option should work with a value equal to "true": module 1`] = `
17681768
"// Imports
1769-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
1769+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
17701770
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
17711771
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"/image.png\\", import.meta.url);
17721772
var ___HTML_LOADER_IMPORT_2___ = new URL(\\"aliasImg\\", import.meta.url);

test/__snapshots__/preprocessor-option.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`'process' option should work with Async "preprocessor" Function option:
44

55
exports[`'process' option should work with Async "preprocessor" Function option: module 1`] = `
66
"// Imports
7-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
7+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
88
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
99
// Module
1010
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -27,7 +27,7 @@ exports[`'process' option should work with the "preprocessor" option #2: errors
2727
2828
exports[`'process' option should work with the "preprocessor" option #2: module 1`] = `
2929
"// Imports
30-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
30+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
3131
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png.webp\\", import.meta.url);
3232
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"./image.png\\", import.meta.url);
3333
// Module
@@ -49,7 +49,7 @@ exports[`'process' option should work with the "preprocessor" option: errors 1`]
4949
5050
exports[`'process' option should work with the "preprocessor" option: module 1`] = `
5151
"// Imports
52-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
52+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
5353
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png\\", import.meta.url);
5454
// Module
5555
var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);
@@ -72,7 +72,7 @@ exports[`'process' option should work with the Async "preprocessor" Function opt
7272
7373
exports[`'process' option should work with the Async "preprocessor" Function option #2: module 1`] = `
7474
"// Imports
75-
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>/\\";
75+
import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \\"file:///<cwd>//src/runtime/getUrl.js\\";
7676
var ___HTML_LOADER_IMPORT_0___ = new URL(\\"./image.png.webp\\", import.meta.url);
7777
var ___HTML_LOADER_IMPORT_1___ = new URL(\\"./image.png\\", import.meta.url);
7878
// Module

0 commit comments

Comments
 (0)