Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: fix snapshots
  • Loading branch information
alexander-akait committed Jul 14, 2021
commit f13dd7b92b174dd537b347be3156d2035841e4ee
2 changes: 1 addition & 1 deletion test/__snapshots__/url-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`"url" option should resolve "file" protocol path: module 1`] = `
"// Imports
import ___CSS_LOADER_API_IMPORT___ from \\"../../../src/runtime/api.js\\";
import ___CSS_LOADER_GET_URL_IMPORT___ from \\"../../../src/runtime/getUrl.js\\";
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(\\"/home/evilebottnawi/IdeaProjects/css-loader/test/fixtures/url/img.png\\", import.meta.url);
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(\\"<cwd>/test/fixtures/url/img.png\\", import.meta.url);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
// Module
Expand Down
5 changes: 4 additions & 1 deletion test/url-option.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ describe('"url" option', () => {
const stats = await compile(compiler);

expect(
getModuleSource("./url/url-file-protocol.css", stats)
getModuleSource("./url/url-file-protocol.css", stats).replace(
new RegExp(process.cwd().replace(/\\/g, "/"), "g"),
"<cwd>"
)
).toMatchSnapshot("module");
expect(getExecutedCode("main.bundle.js", compiler, stats)).toMatchSnapshot(
"result"
Expand Down