☕️ Classic, reliable, trusted test framework for Node.js and the browser
Update new tests to work in browser per test hierarchy reorganization
ScottFreeCode958fbb4509eb
diff --git a/test/unit/mocha.spec.js b/test/unit/mocha.spec.jsindex bef492e4..37b75ffd 100644--- a/test/unit/mocha.spec.js+++ b/test/unit/mocha.spec.js@@ -37,8 +37,8 @@ describe('Mocha', function () {it('should add the given file to the files array', function () {var mocha = new Mocha(blankOpts);mocha.addFile('myFile.js');- mocha.files.length.should.equal(1);- mocha.files[0].should.equal('myFile.js');+ expect(mocha.files.length).to.equal(1);+ expect(mocha.files[0]).to.equal('myFile.js');});});@@ -46,12 +46,12 @@ describe('Mocha', function () {it('should set the invert option to true', function () {var mocha = new Mocha(blankOpts);mocha.invert();- mocha.options.invert.should.equal(true);+ expect(mocha.options.invert).to.equal(true);});it('should be chainable', function () {var mocha = new Mocha(blankOpts);- mocha.invert().should.equal(mocha);+ expect(mocha.invert()).to.equal(mocha);});});@@ -59,24 +59,24 @@ describe('Mocha', function () {it('should set the ignoreLeaks option to true when param equals true', function () {var mocha = new Mocha(blankOpts);mocha.ignoreLeaks(true);- mocha.options.ignoreLeaks.should.equal(true);+ expect(mocha.options.ignoreLeaks).to.equal(true);});it('should set the ignoreLeaks option to false when param equals false', function () {var mocha = new Mocha(blankOpts);mocha.ignoreLeaks(false);- mocha.options.ignoreLeaks.should.equal(false);+ expect(mocha.options.ignoreLeaks).to.equal(false);});it('should set the ignoreLeaks option to false when the param is undefined', function () {var mocha = new Mocha(blankOpts);mocha.ignoreLeaks();- mocha.options.ignoreLeaks.should.equal(false);+ expect(mocha.options.ignoreLeaks).to.equal(false);});it('should be chainable', function () {var mocha = new Mocha(blankOpts);- mocha.ignoreLeaks(false).should.equal(mocha);+ expect(mocha.ignoreLeaks(false)).to.equal(mocha);});});@@ -84,12 +84,12 @@ describe('Mocha', function () {it('should set the ignoreLeaks option to false', function () {var mocha = new Mocha(blankOpts);mocha.checkLeaks();- mocha.options.ignoreLeaks.should.equal(false);+ expect(mocha.options.ignoreLeaks).to.equal(false);});it('should be chainable', function () {var mocha = new Mocha(blankOpts);- mocha.checkLeaks().should.equal(mocha);+ expect(mocha.checkLeaks()).to.equal(mocha);});});@@ -97,12 +97,12 @@ describe('Mocha', function () {it('should set the fullStackTrace option to true', function () {var mocha = new Mocha(blankOpts);mocha.fullTrace();- mocha.options.fullStackTrace.should.equal(true);+ expect(mocha.options.fullStackTrace).to.equal(true);});it('should be chainable', function () {var mocha = new Mocha(blankOpts);- mocha.fullTrace().should.equal(mocha);+ expect(mocha.fullTrace()).to.equal(mocha);});});@@ -110,12 +110,12 @@ describe('Mocha', function () {it('should set the growl option to true', function () {var mocha = new Mocha(blankOpts);mocha.growl();- mocha.options.growl.should.equal(true);+ expect(mocha.options.growl).to.equal(true);});it('should be chainable', function () {var mocha = new Mocha(blankOpts);- mocha.growl().should.equal(mocha);+ expect(mocha.growl()).to.equal(mocha);});});@@ -123,24 +123,24 @@ describe('Mocha', function () {it('should set the useInlineDiffs option to true when param equals true', function () {var mocha = new Mocha(blankOpts);mocha.useInlineDiffs(true);- mocha.options.useInlineDiffs.should.equal(true);+ expect(mocha.options.useInlineDiffs).to.equal(true);});it('should set the useInlineDiffs option to false when param equals false', function () {var mocha = new Mocha(blankOpts);mocha.useInlineDiffs(false);- mocha.options.useInlineDiffs.should.equal(false);+ expect(mocha.options.useInlineDiffs).to.equal(false);});it('should set the useInlineDiffs option to false when the param is undefined', function () {var mocha = new Mocha(blankOpts);mocha.useInlineDiffs();- mocha.options.useInlineDiffs.should.equal(false);+ expect(mocha.options.useInlineDiffs).to.equal(false);});it('should be chainable', function () {var mocha = new Mocha(blankOpts);- mocha.useInlineDiffs().should.equal(mocha);+ expect(mocha.useInlineDiffs()).to.equal(mocha);});});@@ -148,7 +148,7 @@ describe('Mocha', function () {it('should set the noHighlighting option to true', function () {var mocha = new Mocha(blankOpts);mocha.noHighlighting();- mocha.options.noHighlighting.should.equal(true);+ expect(mocha.options.noHighlighting).to.equal(true);});});@@ -156,7 +156,7 @@ describe('Mocha', function () {it('should set the allowUncaught option to true', function () {var mocha = new Mocha(blankOpts);mocha.allowUncaught();- mocha.options.allowUncaught.should.equal(true);+ expect(mocha.options.allowUncaught).to.equal(true);});});@@ -164,7 +164,7 @@ describe('Mocha', function () {it('should set the delay option to true', function () {var mocha = new Mocha(blankOpts);mocha.delay();- mocha.options.delay.should.equal(true);+ expect(mocha.options.delay).to.equal(true);});});});