few more test migration fixes

This commit is contained in:
Bazyli Brzóska 2018-01-27 16:55:38 +01:00
parent 5ed75dd121
commit 3d23bbcfe4
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
it("should support an empty context", function() { it("should support an empty context", function() {
var c = require.context(".", true, /^nothing$/); var c = require.context(".", true, /^nothing$/);
expect(typeof c.id).to.be.oneOf(["number", "string"]); expect(typeof c.id === "number" || typeof c.id === "string").toBeTruthy();
expect(function() { expect(function() {
c.resolve(""); c.resolve("");
}).toThrowError(); }).toThrowError();

View File

@ -3,11 +3,11 @@ it("should evaluate require.resolve as truthy value", function() {
if(require.resolve) if(require.resolve)
id = require.resolve("./module.js"); id = require.resolve("./module.js");
expect(typeof id).to.be.oneOf("number", "string"); expect(typeof id === "number" || typeof id === "string").toBeTruthy();
}); });
it("should evaluate require.resolve in ?: expression", function() { it("should evaluate require.resolve in ?: expression", function() {
var id = require.resolve ? require.resolve("./module.js") : null; var id = require.resolve ? require.resolve("./module.js") : null;
expect(typeof id).to.be.oneOf("number", "string"); expect(typeof id === "number" || typeof id === "string").toBeTruthy();
}); });

View File

@ -16,6 +16,6 @@ it("should make different modules for query", function() {
expect(require("return-module")).toBe("module is returned"); expect(require("return-module")).toBe("module is returned");
const overrideExports = require("override-exports"); const overrideExports = require("override-exports");
expect(overrideExports).to.be.a.Object(); expect(overrideExports).toBeOfType("object");
expect(Object.keys(overrideExports).length).to.be.exactly(0); expect(Object.keys(overrideExports)).toHaveLength(0);
}); });