File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ const mockObjectId = (data) => {
99} ;
1010
1111test ( "toString() returns right value" , ( ) => {
12- assert . deepEqual ( mockObjectId ( "foo" ) . toString ( ) , "foo" ) ;
12+ assert . equal ( mockObjectId ( "foo" ) . toString ( ) , "foo" ) ;
1313} ) ;
1414test ( "it’s an object" , ( ) => {
1515 const actual = mockObjectId ( "foo" ) ;
16- assert . deepEqual ( typeof actual , "object" ) ;
16+ assert . equal ( typeof actual , "object" ) ;
1717} ) ;
1818test ( "two objectIds with same value are equal" , ( ) => {
1919 const first = mockObjectId ( "foo" ) ;
Original file line number Diff line number Diff line change 1+ import { test } from "node:test" ;
2+ import assert from "node:assert/strict" ;
3+
14const mockObjectId = ( data ) => {
25 const oid = {
36 name : data ,
@@ -9,14 +12,14 @@ const mockObjectId = (data) => {
912} ;
1013
1114test ( "toString() returns right value" , ( ) => {
12- expect ( mockObjectId ( "foo" ) . toString ( ) ) . toEqual ( "foo" ) ;
15+ assert . equal ( mockObjectId ( "foo" ) . toString ( ) , "foo" ) ;
1316} ) ;
1417test ( "it’s an object" , ( ) => {
1518 const actual = mockObjectId ( "foo" ) ;
16- expect ( typeof actual ) . toEqual ( "object" ) ;
19+ assert . equal ( typeof actual , "object" ) ;
1720} ) ;
1821test ( "two objectIds with same value are equal" , ( ) => {
1922 const first = mockObjectId ( "foo" ) ;
2023 const second = mockObjectId ( "foo" ) ;
21- expect ( first ) . toEqual ( second ) ;
24+ assert . deepEqual ( first , second ) ;
2225} ) ;
You can’t perform that action at this time.
0 commit comments