@@ -17,6 +17,7 @@ import {
1717 subsetEquality ,
1818 typeEquality ,
1919} from '../utils' ;
20+ import { equals } from "../jasmineUtils" ;
2021
2122describe ( 'getPath()' , ( ) => {
2223 test ( 'property exists' , ( ) => {
@@ -578,9 +579,21 @@ describe('arrayBufferEquality', () => {
578579 expect ( arrayBufferEquality ( a , b ) ) . toBeTruthy ( ) ;
579580 } ) ;
580581
581- test ( 'returns false when given matching DataView' , ( ) => {
582+ test ( 'returns false when given non- matching DataView' , ( ) => {
582583 const a = new DataView ( Uint8Array . from ( [ 1 , 2 , 3 ] ) . buffer ) ;
583584 const b = new DataView ( Uint8Array . from ( [ 3 , 2 , 1 ] ) . buffer ) ;
584585 expect ( arrayBufferEquality ( a , b ) ) . toBeFalsy ( ) ;
585586 } ) ;
587+
588+ test ( 'returns true when given matching URL' , ( ) => {
589+ const a = new URL ( "https://jestjs.io/" ) ;
590+ const b = new URL ( "https://jestjs.io/" ) ;
591+ expect ( equals ( a , b ) ) . toBeTruthy ( ) ;
592+ } ) ;
593+
594+ test ( 'returns false when given non-matching URL' , ( ) => {
595+ const a = new URL ( "https://jestjs.io/docs/getting-started" ) ;
596+ const b = new URL ( "https://jestjs.io/docs/getting-started#using-babel" ) ;
597+ expect ( equals ( a , b ) ) . toBeFalsy ( ) ;
598+ } ) ;
586599} ) ;
0 commit comments