We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b82675 commit e88ae21Copy full SHA for e88ae21
test/loaderTest.js
@@ -41,4 +41,16 @@ describe("loader", function() {
41
'module.exports = "<h3>#{number} {customer}</h3><p>{title}</p><img src=" + require("./image.png") + ">";'
42
);
43
});
44
-});
+ it("should not translate root-relative urls (without root query)", function() {
45
+ loader.call({}, 'Text <img src="/image.png">').should.be.eql(
46
+ 'module.exports = "Text <img src=\\"/image.png\\">";'
47
+ );
48
+ });
49
+ it("should accept root from query", function() {
50
+ loader.call({
51
+ query: "?root=/test/"
52
+ }, 'Text <img src="/image.png">').should.be.eql(
53
+ 'module.exports = "Text <img src=\\"" + require("/test/image.png") + "\\">";'
54
55
56
+});
0 commit comments