Skip to content

Commit 57533f1

Browse files
committed
Removed required loader argument in schema and updated unit tests
1 parent 5951be3 commit 57533f1

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

schema/schema.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"type": "string"
1717
},
1818
"filename": {
19-
"description": "The filename and path that ExtractTextPlugin will extract to.",
19+
"description": "The filename and path that ExtractTextPlugin will extract to",
2020
"type": "string"
2121
},
2222
"loader": {
@@ -27,6 +27,5 @@
2727
"description": "",
2828
"type": "string"
2929
}
30-
},
31-
"required": ["loader"]
30+
}
3231
}

test/extract.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ describe("ExtractTextPlugin.extract()", function() {
1111
});
1212

1313
context("json schema validation", function() {
14-
it("throws if an incorrect config is passed in", function() {
15-
should.throws(function() {
16-
ExtractTextPlugin.extract(['style-loader', 'file.css']);
14+
it("does not throw if a filename is specified", function() {
15+
should.doesNotThrow(function() {
16+
ExtractTextPlugin.extract("file.css");
1717
});
1818
});
1919

@@ -23,9 +23,9 @@ describe("ExtractTextPlugin.extract()", function() {
2323
});
2424
});
2525

26-
it("does not throw if a filename is specified", function() {
27-
should.doesNotThrow(function() {
28-
ExtractTextPlugin.extract("file.css");
26+
it("throws if an incorrect config is passed in", function() {
27+
should.throws(function() {
28+
ExtractTextPlugin.extract({style: 'file.css'});
2929
});
3030
});
3131
});

0 commit comments

Comments
 (0)