Skip to content

Commit

Permalink
Update new tests to work in browser per test hierarchy reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottFreeCode committed Jul 6, 2017
1 parent 1df7c94 commit 958fbb4
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions test/unit/mocha.spec.js
Expand Up @@ -37,134 +37,134 @@ 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');
});
});

describe('.invert()', 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);
});
});

describe('.ignoreLeaks()', 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);
});
});

describe('.checkLeaks()', 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);
});
});

describe('.fullTrace()', 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);
});
});

describe('.growl()', 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);
});
});

describe('.useInlineDiffs()', 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);
});
});

describe('.noHighlighting()', 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);
});
});

describe('.allowUncaught()', 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);
});
});

describe('.delay()', 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);
});
});
});

0 comments on commit 958fbb4

Please sign in to comment.