Skip to content

Commit

Permalink
fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyajones committed Jul 18, 2023
1 parent 1eb4d8c commit 818c6e5
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ describe('plugin_api_host test', () => {

it('returns url data from the tf storage', () => {
// Do not rely on Polymer bundle in the test.
const createElementSpy = spyOn(document, 'createElement');
createElementSpy.withArgs('tf-storage').and.returnValue({
window.tensorboard = {
tf_storage: {
getUrlHashDict: () => {
return {
Expand All @@ -263,15 +262,16 @@ describe('plugin_api_host test', () => {
'p.another_plugn.b': '2',
};
},
},
} as any);

} as any,
};
coreApi.init();
const actual = triggerGetUrlData({pluginName: 'plugin_id'});
expect(actual).toEqual({
a: '1',
b: 'b',
});

delete (window as any).tensorboard;
});
});

Expand Down

0 comments on commit 818c6e5

Please sign in to comment.