Skip to content

Commit fffd317

Browse files
committed
tests: use strict equality
1 parent 2183ac1 commit fffd317

File tree

2 files changed

+66
-66
lines changed

2 files changed

+66
-66
lines changed

test/browserify.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ run('when browserified', function () {
3232

3333
describe('depd(namespace)', function () {
3434
it('creates deprecated function', function () {
35-
assert.equal(typeof depd('test'), 'function')
35+
assert.strictEqual(typeof depd('test'), 'function')
3636
})
3737

3838
it('requires namespace', function () {
@@ -43,13 +43,13 @@ run('when browserified', function () {
4343
describe('deprecate(message)', function () {
4444
it('should not log message', function () {
4545
function callold () { mylib.old() }
46-
assert.equal(captureStderr(callold), '')
46+
assert.strictEqual(captureStderr(callold), '')
4747
})
4848

4949
describe('when message omitted', function () {
5050
it('should not log message', function () {
5151
function callold () { mylib.automsgnamed() }
52-
assert.equal(captureStderr(callold), '')
52+
assert.strictEqual(captureStderr(callold), '')
5353
})
5454
})
5555
})
@@ -62,24 +62,24 @@ run('when browserified', function () {
6262

6363
it('should not log on call to function', function () {
6464
function callold () { mylib.oldfn() }
65-
assert.equal(captureStderr(callold), '')
65+
assert.strictEqual(captureStderr(callold), '')
6666
})
6767

6868
it('should have same arity', function () {
69-
assert.equal(mylib.oldfn.length, 2)
69+
assert.strictEqual(mylib.oldfn.length, 2)
7070
})
7171

7272
it('should pass arguments', function () {
7373
var ret
7474
function callold () { ret = mylib.oldfn(1, 2) }
75-
assert.equal(captureStderr(callold), '')
76-
assert.equal(ret, 2)
75+
assert.strictEqual(captureStderr(callold), '')
76+
assert.strictEqual(ret, 2)
7777
})
7878

7979
describe('when message omitted', function () {
8080
it('should not log message', function () {
8181
function callold () { mylib.oldfnauto() }
82-
assert.equal(captureStderr(callold), '')
82+
assert.strictEqual(captureStderr(callold), '')
8383
})
8484
})
8585
})
@@ -105,69 +105,69 @@ run('when browserified', function () {
105105

106106
it('should not log on access to property', function () {
107107
function callprop () { return mylib.propa }
108-
assert.equal(captureStderr(callprop), '')
108+
assert.strictEqual(captureStderr(callprop), '')
109109
})
110110

111111
it('should not log on setting property', function () {
112112
var val
113113
function callprop () { val = mylib.propa }
114114
function setprop () { mylib.propa = 'newval' }
115-
assert.equal(captureStderr(setprop), '')
116-
assert.equal(captureStderr(callprop), '')
117-
assert.equal(val, 'newval')
115+
assert.strictEqual(captureStderr(setprop), '')
116+
assert.strictEqual(captureStderr(callprop), '')
117+
assert.strictEqual(val, 'newval')
118118
})
119119

120120
describe('when obj is a function', function () {
121121
it('should not log on access to property on function', function () {
122122
function callprop () { return mylib.fnprop.propa }
123-
assert.equal(captureStderr(callprop), '')
123+
assert.strictEqual(captureStderr(callprop), '')
124124
})
125125

126126
it('should not generate message on named function', function () {
127127
function callprop () { return mylib.fnprop.propautomsg }
128-
assert.equal(captureStderr(callprop), '')
128+
assert.strictEqual(captureStderr(callprop), '')
129129
})
130130
})
131131

132132
describe('when value descriptor', function () {
133133
it('should not log on access and set', function () {
134134
function callold () { return mylib.propa }
135135
function setold () { mylib.propa = 'val' }
136-
assert.equal(captureStderr(callold), '')
137-
assert.equal(captureStderr(setold), '')
136+
assert.strictEqual(captureStderr(callold), '')
137+
assert.strictEqual(captureStderr(setold), '')
138138
})
139139

140140
it('should not log on set to non-writable', function () {
141141
function callold () { return mylib.propget }
142142
function setold () { mylib.propget = 'val' }
143-
assert.equal(captureStderr(callold), '')
144-
assert.equal(captureStderr(setold), '')
143+
assert.strictEqual(captureStderr(callold), '')
144+
assert.strictEqual(captureStderr(setold), '')
145145
})
146146
})
147147

148148
describe('when accessor descriptor', function () {
149149
it('should log on access and set', function () {
150150
function callold () { return mylib.propdyn }
151151
function setold () { mylib.propdyn = 'val' }
152-
assert.equal(captureStderr(callold), '')
153-
assert.equal(captureStderr(setold), '')
152+
assert.strictEqual(captureStderr(callold), '')
153+
assert.strictEqual(captureStderr(setold), '')
154154
})
155155

156156
it('should not log on access when no accessor', function () {
157157
function callold () { return mylib.propsetter }
158-
assert.equal(captureStderr(callold), '')
158+
assert.strictEqual(captureStderr(callold), '')
159159
})
160160

161161
it('should not log on set when no setter', function () {
162162
function callold () { mylib.propgetter = 'val' }
163-
assert.equal(captureStderr(callold), '')
163+
assert.strictEqual(captureStderr(callold), '')
164164
})
165165
})
166166

167167
describe('when message omitted', function () {
168168
it('should not generate message for method call on named function', function () {
169169
function callold () { return mylib.propauto }
170-
assert.equal(captureStderr(callold), '')
170+
assert.strictEqual(captureStderr(callold), '')
171171
})
172172
})
173173
})

0 commit comments

Comments
 (0)