Skip to content

Commit 1828946

Browse files
authored
chore: replace deprecated tap deepEqual() with same() (#109)
1 parent 39d08ff commit 1828946

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/validator.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ test('Validator - real commits', (t) => {
199199
v.on('commit', (data) => {
200200
const c = data.commit
201201
tt.equal(c.sha, 'e7c077c610afa371430180fbd447bfef60ebc5ea', 'sha')
202-
tt.deepEqual(c.subsystems, ['stream'], 'subsystems')
202+
tt.same(c.subsystems, ['stream'], 'subsystems')
203203
tt.equal(c.prUrl, 'https://github.com/nodejs/node/pull/6170', 'pr')
204204
const msgs = data.messages
205205
const failed = msgs.filter((item) => {
@@ -222,7 +222,7 @@ test('Validator - real commits', (t) => {
222222
const c = data.commit.toJSON()
223223
tt.equal(c.sha, 'b6475b9a9d0da0971eec7eb5559dff4d18a0e721', 'sha')
224224
tt.equal(c.date, 'Tue Mar 29 08:09:37 2016 -0500', 'date')
225-
tt.deepEqual(c.subsystems, ['tty'], 'subsystems')
225+
tt.same(c.subsystems, ['tty'], 'subsystems')
226226
tt.equal(c.prUrl, 'https://github.com/nodejs/node/pull/5947', 'pr')
227227
tt.equal(c.revert, true, 'revert')
228228
const msgs = data.messages
@@ -243,7 +243,7 @@ test('Validator - real commits', (t) => {
243243
const c = data.commit.toJSON()
244244
tt.equal(c.sha, '75487f0db80e70a3e27fabfe323a33258dfbbea8', 'sha')
245245
tt.equal(c.date, 'Fri Apr 15 13:32:36 2016 +0200', 'date')
246-
tt.deepEqual(c.subsystems, ['module'], 'subsystems')
246+
tt.same(c.subsystems, ['module'], 'subsystems')
247247
tt.equal(c.prUrl, 'https://github.com/nodejs/node/pull/6215', 'pr')
248248
tt.equal(c.revert, false, 'revert')
249249
const msgs = data.messages
@@ -255,7 +255,7 @@ test('Validator - real commits', (t) => {
255255
return item.id
256256
})
257257
const exp = ['line-length', 'title-length']
258-
tt.deepEqual(ids.sort(), exp.sort(), 'message ids')
258+
tt.same(ids.sort(), exp.sort(), 'message ids')
259259
tt.end()
260260
})
261261
})
@@ -267,7 +267,7 @@ test('Validator - real commits', (t) => {
267267
const c = data.commit.toJSON()
268268
tt.equal(c.sha, 'b04fe688d5859f707cf1a5e0206967268118bf7a', 'sha')
269269
tt.equal(c.date, 'Sun May 1 21:10:21 2022 +0530', 'date')
270-
tt.deepEqual(c.subsystems, ['bootstrap'], 'subsystems')
270+
tt.same(c.subsystems, ['bootstrap'], 'subsystems')
271271
tt.equal(c.prUrl, 'https://github.com/nodejs/node/pull/42934', 'pr')
272272
tt.equal(c.revert, true, 'revert')
273273
const msgs = data.messages
@@ -286,7 +286,7 @@ test('Validator - real commits', (t) => {
286286
const c = data.commit.toJSON()
287287
tt.equal(c.sha, 'b04fe688d5859f707cf1a5e0206967268118bf7a', 'sha')
288288
tt.equal(c.date, 'Sun May 1 21:10:21 2022 +0530', 'date')
289-
tt.deepEqual(c.subsystems, ['bootstrap'], 'subsystems')
289+
tt.same(c.subsystems, ['bootstrap'], 'subsystems')
290290
tt.equal(c.prUrl, 'https://github.com/nodejs/node/pull/42934', 'pr')
291291
tt.equal(c.revert, true, 'revert')
292292
const msgs = data.messages
@@ -298,7 +298,7 @@ test('Validator - real commits', (t) => {
298298
return item.id
299299
})
300300
const exp = ['title-length']
301-
tt.deepEqual(ids.sort(), exp.sort(), 'message ids')
301+
tt.same(ids.sort(), exp.sort(), 'message ids')
302302
tt.end()
303303
})
304304
})
@@ -312,7 +312,7 @@ test('Validator - real commits', (t) => {
312312
const c = data.commit.toJSON()
313313
tt.equal(c.sha, 'cbb404503c9df13aaeb3dd8b345cb3f34c8c07e4', 'sha')
314314
tt.equal(c.date, 'Sat Oct 22 10:22:43 2022 +0200', 'date')
315-
tt.deepEqual(c.subsystems, ['deps'], 'subsystems')
315+
tt.same(c.subsystems, ['deps'], 'subsystems')
316316
tt.equal(c.revert, true, 'revert')
317317
const msgs = data.messages
318318
const filtered = msgs.filter((item) => {
@@ -330,7 +330,7 @@ test('Validator - real commits', (t) => {
330330
const c = data.commit.toJSON()
331331
tt.equal(c.sha, '7d3a7ea0d7df9b6f11df723dec370f49f4f87e99', 'sha')
332332
tt.equal(c.date, 'Thu Mar 3 10:10:46 2016 -0600', 'date')
333-
tt.deepEqual(c.subsystems, [], 'subsystems')
333+
tt.same(c.subsystems, [], 'subsystems')
334334
tt.equal(c.prUrl, '#5546', 'pr')
335335
tt.equal(c.revert, false, 'revert')
336336
const msgs = data.messages
@@ -364,7 +364,7 @@ test('Validator - real commits', (t) => {
364364
const c = data.commit.toJSON()
365365
tt.equal(c.sha, '7d3a7ea0d7df9b6f11df723dec370f49f4f87e99', 'sha')
366366
tt.equal(c.date, 'Thu Mar 3 10:10:46 2016 -0600', 'date')
367-
tt.deepEqual(c.subsystems, ['test'], 'subsystems')
367+
tt.same(c.subsystems, ['test'], 'subsystems')
368368
tt.equal(c.prUrl, null, 'pr')
369369
tt.equal(c.revert, false, 'revert')
370370
const msgs = data.messages
@@ -383,7 +383,7 @@ test('Validator - real commits', (t) => {
383383
const c = data.commit.toJSON()
384384
tt.equal(c.sha, 'c5545f2c63fe30b0cfcdafab18c26df8286881d0', 'sha')
385385
tt.equal(c.date, '2016-09-13T10:57:49Z', 'date')
386-
tt.deepEqual(c.subsystems, ['fs'], 'subsystems')
386+
tt.same(c.subsystems, ['fs'], 'subsystems')
387387
tt.equal(c.prUrl, 'https://github.com/nodejs/node/pull/8515', 'pr')
388388
tt.equal(c.revert, false, 'revert')
389389
const msgs = data.messages

0 commit comments

Comments
 (0)