mirror of https://github.com/webpack/webpack.git
few more test migration fixes
This commit is contained in:
parent
5ed75dd121
commit
3d23bbcfe4
|
@ -1,6 +1,6 @@
|
|||
it("should support an empty context", function() {
|
||||
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() {
|
||||
c.resolve("");
|
||||
}).toThrowError();
|
||||
|
|
|
@ -3,11 +3,11 @@ it("should evaluate require.resolve as truthy value", function() {
|
|||
if(require.resolve)
|
||||
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() {
|
||||
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();
|
||||
});
|
||||
|
|
|
@ -16,6 +16,6 @@ it("should make different modules for query", function() {
|
|||
expect(require("return-module")).toBe("module is returned");
|
||||
|
||||
const overrideExports = require("override-exports");
|
||||
expect(overrideExports).to.be.a.Object();
|
||||
expect(Object.keys(overrideExports).length).to.be.exactly(0);
|
||||
expect(overrideExports).toBeOfType("object");
|
||||
expect(Object.keys(overrideExports)).toHaveLength(0);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue