Skip to content

Commit 9dc12ff

Browse files
committed
migrate should to expect, part 3
\.to\.have\.property\((.+)\)\.toEqual\((.+)\); ➡️ .toHaveProperty($1, $2);
1 parent a6c2aca commit 9dc12ff

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

test/cases/loaders/query/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ it("should pass query to loader without resource", function() {
2727
it("should pass query to multiple loaders", function() {
2828
var result = require("./loaders/queryloader?query1!./loaders/queryloader?query2!./a?resourcequery");
2929
expect(result).toBeTypeOf("object");
30-
expect(result).to.have.property("resourceQuery").toEqual("?resourcequery");
31-
expect(result).to.have.property("query").toEqual("?query1");
32-
expect(result).to.have.property("prev").toEqual("module.exports = " + JSON.stringify({
30+
expect(result).toHaveProperty("resourceQuery", "?resourcequery");
31+
expect(result).toHaveProperty("query", "?query1");
32+
expect(result).toHaveProperty("prev", "module.exports = " + JSON.stringify({
3333
resourceQuery: "?resourcequery",
3434
query: "?query2",
3535
prev: "module.exports = \"a\";"

test/cases/parsing/extract-amd.nominimize/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ it("should parse fancy function calls with arrow functions", function() {
55
)(["./constructor"], (c) => {
66
return new c(1324);
77
});
8-
expect(module.exports).to.have.property("value").toEqual(1324);
8+
expect(module.exports).toHaveProperty("value", 1324);
99
(("function"==typeof define && define.amd ?
1010
define :
1111
(e,t) => {return t()}
1212
)(["./constructor"], (c) => {
1313
return new c(4231);
1414
}));
15-
expect(module.exports).to.have.property("value").toEqual(4231);
15+
expect(module.exports).toHaveProperty("value", 4231);
1616
});
1717

1818
it("should parse fancy AMD calls with arrow functions", function() {

test/cases/parsing/extract-amd/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ it("should parse fancy function calls", function() {
55
)(["./constructor"], function(c) {
66
return new c(1324);
77
});
8-
expect(module.exports).to.have.property("value").toEqual(1324);
8+
expect(module.exports).toHaveProperty("value", 1324);
99
(("function"==typeof define && define.amd ?
1010
define :
1111
function(e,t){return t()}
1212
)(["./constructor"], function(c) {
1313
return new c(4231);
1414
}));
15-
expect(module.exports).to.have.property("value").toEqual(4231);
15+
expect(module.exports).toHaveProperty("value", 4231);
1616
});
1717

1818
it("should parse fancy AMD calls", function() {

test/configCases/plugins/lib-manifest-plugin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ it("should write the correct manifest", function() {
1313
expect(manifest).to.have.key("content", "name");
1414
expect(manifest.content).not.toHaveProperty("./a.js");
1515
expect(manifest.content).toHaveProperty("./index.js");
16-
expect(manifest.content["./index.js"]).to.have.property("id").toEqual(module.id);
16+
expect(manifest.content["./index.js"]).toHaveProperty("id", module.id);
1717
});

0 commit comments

Comments
 (0)