@@ -1318,3 +1318,47 @@ test('Crypto', { skip: !hasCrypto }, async () => {
13181318 assertDeepAndStrictEqual ( a , b ) ;
13191319 }
13201320} ) ;
1321+
1322+ // check URL
1323+ {
1324+ const a = new URL ( 'http://foo' ) ;
1325+ const b = new URL ( 'http://bar' ) ;
1326+
1327+ assertNotDeepOrStrict ( a , b ) ;
1328+ }
1329+
1330+ {
1331+ const a = new URL ( 'http://foo' ) ;
1332+ const b = new URL ( 'http://foo' ) ;
1333+
1334+ assertDeepAndStrictEqual ( a , b ) ;
1335+ }
1336+
1337+ {
1338+ const a = new URL ( 'http://foo' ) ;
1339+ const b = new URL ( 'http://foo' ) ;
1340+ a . bar = 1 ;
1341+ b . bar = 2 ;
1342+ assertNotDeepOrStrict ( a , b ) ;
1343+ }
1344+
1345+ {
1346+ const a = new URL ( 'http://foo' ) ;
1347+ const b = new URL ( 'http://foo' ) ;
1348+ a . bar = 1 ;
1349+ b . bar = 1 ;
1350+ assertDeepAndStrictEqual ( a , b ) ;
1351+ }
1352+
1353+ {
1354+ const a = new URL ( 'http://foo' ) ;
1355+ const b = new URL ( 'http://bar' ) ;
1356+ assert . throws (
1357+ ( ) => assert . deepStrictEqual ( a , b ) ,
1358+ {
1359+ code : 'ERR_ASSERTION' ,
1360+ name : 'AssertionError' ,
1361+ message : / h t t p : \/ \/ b a r /
1362+ }
1363+ ) ;
1364+ }
0 commit comments