Skip to content

Commit 5ed83f9

Browse files
committed
Add tests for empty-object module and null module
1 parent 8be49c3 commit 5ed83f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/urlTest.js

+6
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ describe("url", function() {
125125
test("module from url-loader", ".class { background: green url(module) xyz }", [
126126
[1, ".class { background: green url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA) xyz }", ""]
127127
], "", { './module': "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA" });
128+
test("module from null-loader (empty object from webpack)", ".class { background: green url(module) xyz }", [
129+
[1, ".class { background: green url([object Object]) xyz }", ""]
130+
], "", { './module': {} });
131+
test("module is null", ".class { background: green url(module) xyz }", [
132+
[1, ".class { background: green url(null) xyz }", ""]
133+
], "", { './module': null });
128134

129135
test("background img with url", ".class { background: green url( \"img.png\" ) xyz }", [
130136
[1, ".class { background: green url( \"img.png\" ) xyz }", ""]

0 commit comments

Comments
 (0)