File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import * as factories from '../src/factories';
1212import { spyWpmp } from './utility/mockWpmp' ;
1313import { spyHpm } from './utility/mockHpm' ;
1414import { spyRouter } from './utility/mockRouter' ;
15+ import * as util from '../src/util' ;
1516
1617declare global {
1718 interface Window {
@@ -2936,7 +2937,17 @@ describe('SDK-to-MockApp', function () {
29362937 . then ( pages => {
29372938 // Assert
29382939 expect ( spyApp . getPages ) . toHaveBeenCalled ( ) ;
2939- // expect(pages).toEqual(testData.pages);
2940+ // Workaround to compare pages
2941+ pages
2942+ . forEach ( page => {
2943+ const testPage = util . find ( p => p . name === page . name , testData . pages ) ;
2944+ if ( testPage ) {
2945+ expect ( page . name ) . toEqual ( testPage . name ) ;
2946+ }
2947+ else {
2948+ expect ( true ) . toBe ( false ) ;
2949+ }
2950+ } ) ;
29402951 done ( ) ;
29412952 } ) ;
29422953 } ) ;
You can’t perform that action at this time.
0 commit comments