Skip to content

Commit 958fbb4

Browse files
committed
Update new tests to work in browser per test hierarchy reorganization
1 parent 1df7c94 commit 958fbb4

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

test/unit/mocha.spec.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,134 +37,134 @@ describe('Mocha', function () {
3737
it('should add the given file to the files array', function () {
3838
var mocha = new Mocha(blankOpts);
3939
mocha.addFile('myFile.js');
40-
mocha.files.length.should.equal(1);
41-
mocha.files[0].should.equal('myFile.js');
40+
expect(mocha.files.length).to.equal(1);
41+
expect(mocha.files[0]).to.equal('myFile.js');
4242
});
4343
});
4444

4545
describe('.invert()', function () {
4646
it('should set the invert option to true', function () {
4747
var mocha = new Mocha(blankOpts);
4848
mocha.invert();
49-
mocha.options.invert.should.equal(true);
49+
expect(mocha.options.invert).to.equal(true);
5050
});
5151

5252
it('should be chainable', function () {
5353
var mocha = new Mocha(blankOpts);
54-
mocha.invert().should.equal(mocha);
54+
expect(mocha.invert()).to.equal(mocha);
5555
});
5656
});
5757

5858
describe('.ignoreLeaks()', function () {
5959
it('should set the ignoreLeaks option to true when param equals true', function () {
6060
var mocha = new Mocha(blankOpts);
6161
mocha.ignoreLeaks(true);
62-
mocha.options.ignoreLeaks.should.equal(true);
62+
expect(mocha.options.ignoreLeaks).to.equal(true);
6363
});
6464

6565
it('should set the ignoreLeaks option to false when param equals false', function () {
6666
var mocha = new Mocha(blankOpts);
6767
mocha.ignoreLeaks(false);
68-
mocha.options.ignoreLeaks.should.equal(false);
68+
expect(mocha.options.ignoreLeaks).to.equal(false);
6969
});
7070

7171
it('should set the ignoreLeaks option to false when the param is undefined', function () {
7272
var mocha = new Mocha(blankOpts);
7373
mocha.ignoreLeaks();
74-
mocha.options.ignoreLeaks.should.equal(false);
74+
expect(mocha.options.ignoreLeaks).to.equal(false);
7575
});
7676

7777
it('should be chainable', function () {
7878
var mocha = new Mocha(blankOpts);
79-
mocha.ignoreLeaks(false).should.equal(mocha);
79+
expect(mocha.ignoreLeaks(false)).to.equal(mocha);
8080
});
8181
});
8282

8383
describe('.checkLeaks()', function () {
8484
it('should set the ignoreLeaks option to false', function () {
8585
var mocha = new Mocha(blankOpts);
8686
mocha.checkLeaks();
87-
mocha.options.ignoreLeaks.should.equal(false);
87+
expect(mocha.options.ignoreLeaks).to.equal(false);
8888
});
8989

9090
it('should be chainable', function () {
9191
var mocha = new Mocha(blankOpts);
92-
mocha.checkLeaks().should.equal(mocha);
92+
expect(mocha.checkLeaks()).to.equal(mocha);
9393
});
9494
});
9595

9696
describe('.fullTrace()', function () {
9797
it('should set the fullStackTrace option to true', function () {
9898
var mocha = new Mocha(blankOpts);
9999
mocha.fullTrace();
100-
mocha.options.fullStackTrace.should.equal(true);
100+
expect(mocha.options.fullStackTrace).to.equal(true);
101101
});
102102

103103
it('should be chainable', function () {
104104
var mocha = new Mocha(blankOpts);
105-
mocha.fullTrace().should.equal(mocha);
105+
expect(mocha.fullTrace()).to.equal(mocha);
106106
});
107107
});
108108

109109
describe('.growl()', function () {
110110
it('should set the growl option to true', function () {
111111
var mocha = new Mocha(blankOpts);
112112
mocha.growl();
113-
mocha.options.growl.should.equal(true);
113+
expect(mocha.options.growl).to.equal(true);
114114
});
115115

116116
it('should be chainable', function () {
117117
var mocha = new Mocha(blankOpts);
118-
mocha.growl().should.equal(mocha);
118+
expect(mocha.growl()).to.equal(mocha);
119119
});
120120
});
121121

122122
describe('.useInlineDiffs()', function () {
123123
it('should set the useInlineDiffs option to true when param equals true', function () {
124124
var mocha = new Mocha(blankOpts);
125125
mocha.useInlineDiffs(true);
126-
mocha.options.useInlineDiffs.should.equal(true);
126+
expect(mocha.options.useInlineDiffs).to.equal(true);
127127
});
128128

129129
it('should set the useInlineDiffs option to false when param equals false', function () {
130130
var mocha = new Mocha(blankOpts);
131131
mocha.useInlineDiffs(false);
132-
mocha.options.useInlineDiffs.should.equal(false);
132+
expect(mocha.options.useInlineDiffs).to.equal(false);
133133
});
134134

135135
it('should set the useInlineDiffs option to false when the param is undefined', function () {
136136
var mocha = new Mocha(blankOpts);
137137
mocha.useInlineDiffs();
138-
mocha.options.useInlineDiffs.should.equal(false);
138+
expect(mocha.options.useInlineDiffs).to.equal(false);
139139
});
140140

141141
it('should be chainable', function () {
142142
var mocha = new Mocha(blankOpts);
143-
mocha.useInlineDiffs().should.equal(mocha);
143+
expect(mocha.useInlineDiffs()).to.equal(mocha);
144144
});
145145
});
146146

147147
describe('.noHighlighting()', function () {
148148
it('should set the noHighlighting option to true', function () {
149149
var mocha = new Mocha(blankOpts);
150150
mocha.noHighlighting();
151-
mocha.options.noHighlighting.should.equal(true);
151+
expect(mocha.options.noHighlighting).to.equal(true);
152152
});
153153
});
154154

155155
describe('.allowUncaught()', function () {
156156
it('should set the allowUncaught option to true', function () {
157157
var mocha = new Mocha(blankOpts);
158158
mocha.allowUncaught();
159-
mocha.options.allowUncaught.should.equal(true);
159+
expect(mocha.options.allowUncaught).to.equal(true);
160160
});
161161
});
162162

163163
describe('.delay()', function () {
164164
it('should set the delay option to true', function () {
165165
var mocha = new Mocha(blankOpts);
166166
mocha.delay();
167-
mocha.options.delay.should.equal(true);
167+
expect(mocha.options.delay).to.equal(true);
168168
});
169169
});
170170
});

0 commit comments

Comments
 (0)