@@ -1345,3 +1345,47 @@ test('Crypto', { skip: !hasCrypto }, async () => {
13451345 assertDeepAndStrictEqual ( a , b ) ;
13461346 }
13471347} ) ;
1348+
1349+ // check URL
1350+ {
1351+ const a = new URL ( 'http://foo' ) ;
1352+ const b = new URL ( 'http://bar' ) ;
1353+
1354+ assertNotDeepOrStrict ( a , b ) ;
1355+ }
1356+
1357+ {
1358+ const a = new URL ( 'http://foo' ) ;
1359+ const b = new URL ( 'http://foo' ) ;
1360+
1361+ assertDeepAndStrictEqual ( a , b ) ;
1362+ }
1363+
1364+ {
1365+ const a = new URL ( 'http://foo' ) ;
1366+ const b = new URL ( 'http://foo' ) ;
1367+ a . bar = 1 ;
1368+ b . bar = 2 ;
1369+ assertNotDeepOrStrict ( a , b ) ;
1370+ }
1371+
1372+ {
1373+ const a = new URL ( 'http://foo' ) ;
1374+ const b = new URL ( 'http://foo' ) ;
1375+ a . bar = 1 ;
1376+ b . bar = 1 ;
1377+ assertDeepAndStrictEqual ( a , b ) ;
1378+ }
1379+
1380+ {
1381+ const a = new URL ( 'http://foo' ) ;
1382+ const b = new URL ( 'http://bar' ) ;
1383+ assert . throws (
1384+ ( ) => assert . deepStrictEqual ( a , b ) ,
1385+ {
1386+ code : 'ERR_ASSERTION' ,
1387+ name : 'AssertionError' ,
1388+ message : / h t t p : \/ \/ b a r /
1389+ }
1390+ ) ;
1391+ }
0 commit comments