Skip to content

Commit 06324a5

Browse files
committed
fix last remaining typos/merge conversions to jest
1 parent 601b19a commit 06324a5

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

‎test/DependenciesBlockVariable.unittest.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const DependenciesBlockVariable = require("../lib/DependenciesBlockVariable");
66
describe("DependenciesBlockVariable", () => {
77
let DependenciesBlockVariableInstance, dependencyMock, sandbox;
88

9-
before(() => {
9+
beforeEach(() => {
1010
sandbox = sinon.sandbox.create();
1111
dependencyMock = {
1212
constructor: {
@@ -26,7 +26,7 @@ describe("DependenciesBlockVariable", () => {
2626

2727
describe("hasDependencies", () =>
2828
it("returns `true` if has dependencies", () =>
29-
expect(DependenciesBlockVariableInstance.hasDependencies()).toBe(true);
29+
expect(DependenciesBlockVariableInstance.hasDependencies()).toBe(true)));
3030

3131
describe("disconnect", () =>
3232
it("trigger dependencies disconnection", () => {
@@ -36,27 +36,27 @@ describe("DependenciesBlockVariable", () => {
3636

3737
describe("updateHash", () => {
3838
let hash;
39-
before(() => {
39+
beforeEach(() => {
4040
hash = {
4141
update: sandbox.spy()
4242
};
4343
DependenciesBlockVariableInstance.updateHash(hash);
4444
});
4545

4646
it("should update hash dependencies with name", () =>
47-
expect(hash.update.calledWith("dependencies-name")).toBe(true);
47+
expect(hash.update.calledWith("dependencies-name")).toBe(true));
4848

4949
it("should update hash dependencies with expression", () =>
50-
expect(hash.update.calledWith("expression")).toBe(true);
50+
expect(hash.update.calledWith("expression")).toBe(true));
5151

5252
it("should update hash inside dependencies", () =>
53-
expect(dependencyMock.updateHash.calledOnce).toBe(true);
53+
expect(dependencyMock.updateHash.calledOnce).toBe(true));
5454
});
5555

5656
describe("expressionSource", () => {
5757
let dependencyTemplates, applyMock;
5858

59-
before(() => (applyMock = sandbox.spy()));
59+
beforeEach(() => (applyMock = sandbox.spy()));
6060

6161
it("applies information inside dependency templates", () => {
6262
dependencyTemplates = {

‎test/cases/runtime/module-caching/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ it("should cache modules correctly", function(done) {
22
delete require.cache[require.resolve("./singular.js")];
33
expect(require("./singular.js").value).toBe(1);
44
expect((require("./singular.js")).value).toBe(1);
5-
require("./sing" + "luar.js").value = 2;
5+
require("./sing" + "ular.js").value = 2;
66
expect(require("./singular.js").value).toBe(2);
77
require.ensure(["./two.js"], function(require) {
88
expect(require("./singular.js").value).toBe(2);

‎test/configCases/plugins/provide-plugin/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ it("should provide a module for a nested var within a IIFE's argument", function
1717
});
1818

1919
it("should provide a module for thisExpression", () => {
20-
(this.aaa).should.be.eql("aaa");
20+
expect(this.aaa).toBe("aaa");
2121
});
2222

2323
it("should provide a module for a nested var within a IIFE's this", function() {
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
require("should");
2-
31
it("should run", function() {
42
var a = require("./a");
5-
a.should.be.eql("a");
3+
expect(a).toBe("a");
64
});

0 commit comments

Comments
 (0)