Skip to content

Commit 3d23bbc

Browse files
committed
few more test migration fixes
1 parent 5ed75dd commit 3d23bbc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/cases/context/issue-524/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
it("should support an empty context", function() {
22
var c = require.context(".", true, /^nothing$/);
3-
expect(typeof c.id).to.be.oneOf(["number", "string"]);
3+
expect(typeof c.id === "number" || typeof c.id === "string").toBeTruthy();
44
expect(function() {
55
c.resolve("");
66
}).toThrowError();

test/cases/parsing/issue-4596/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ it("should evaluate require.resolve as truthy value", function() {
33
if(require.resolve)
44
id = require.resolve("./module.js");
55

6-
expect(typeof id).to.be.oneOf("number", "string");
6+
expect(typeof id === "number" || typeof id === "string").toBeTruthy();
77
});
88

99
it("should evaluate require.resolve in ?: expression", function() {
1010
var id = require.resolve ? require.resolve("./module.js") : null;
1111

12-
expect(typeof id).to.be.oneOf("number", "string");
12+
expect(typeof id === "number" || typeof id === "string").toBeTruthy();
1313
});

test/cases/resolving/commomjs-local-module/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ it("should make different modules for query", function() {
1616
expect(require("return-module")).toBe("module is returned");
1717

1818
const overrideExports = require("override-exports");
19-
expect(overrideExports).to.be.a.Object();
20-
expect(Object.keys(overrideExports).length).to.be.exactly(0);
19+
expect(overrideExports).toBeOfType("object");
20+
expect(Object.keys(overrideExports)).toHaveLength(0);
2121
});

0 commit comments

Comments
 (0)