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