Skip to content

Commit

Permalink
add test for track by function
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyajones committed Nov 14, 2023
1 parent 42f42ea commit 8443dd3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tensorboard/webapp/runs/views/runs_table/runs_data_table_test.ts
Expand Up @@ -355,4 +355,21 @@ describe('runs_data_table', () => {

expect(onRegexFilterChangeSpy).toHaveBeenCalledWith('myRegex');
});

fit('trackByRuns serializes data while ignoring color', () => {
const fixture = createComponent({});
const dataTable = fixture.debugElement.query(By.directive(RunsDataTable));
expect(
dataTable.componentInstance.trackByRuns(0, {
id: 'run1',
color: 'orange',
hparam1: 1.234,
})
).toEqual(
JSON.stringify({
id: 'run1',
hparam1: 1.234,
})
);
});
});

0 comments on commit 8443dd3

Please sign in to comment.