Skip to content

Commit 0584eb7

Browse files
fix: lint errors and tests
1 parent 1c394d6 commit 0584eb7

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

projects/observability/src/shared/components/table/data-cell/exit-calls/exit-calls-table-cell-renderer.component.test.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
TableCellNoOpParser,
3+
tableCellDataProvider,
34
tableCellProviders,
4-
tableCellRowDataProvider,
55
TooltipDirective
66
} from '@hypertrace/components';
77
import { createComponentFactory } from '@ngneat/spectator/jest';
@@ -23,29 +23,21 @@ describe('Exit Calls table cell renderer component', () => {
2323
shallow: true
2424
});
2525

26-
test('should render a number as expected', () => {
27-
const spectator = buildComponent({
28-
providers: [tableCellRowDataProvider({ apiExitCalls: 1 })]
29-
});
30-
31-
expect(spectator.query('.exit-calls-count')).toHaveText('1');
32-
expect(spectator.query(TooltipDirective)).toExist();
33-
});
34-
3526
test('testing component properties', () => {
3627
const value = {
3728
key1: '1',
3829
key2: '2'
3930
};
4031
const spectator = buildComponent({
41-
providers: [tableCellRowDataProvider({ apiExitCalls: 2, apiCalleeNameCount: value })]
32+
providers: [tableCellDataProvider({ value: [3, value] })]
4233
});
4334

35+
expect(spectator.queryAll('.exit-calls-count')[0]).toContainText('3');
4436
expect(spectator.component.apiCalleeNameCount).toMatchObject([
4537
['key1', '1'],
4638
['key2', '2']
4739
]);
4840
expect(spectator.component.totalCountOfDifferentApiCallee).toBe(2);
49-
expect(spectator.component.apiExitCalls).toBe(2);
41+
expect(spectator.component.apiExitCalls).toBe(3);
5042
});
5143
});

projects/observability/src/shared/components/table/data-cell/exit-calls/exit-calls-table-cell-renderer.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
TABLE_ROW_DATA
1515
} from '@hypertrace/components';
1616
import { Trace } from '@hypertrace/distributed-tracing';
17-
// import { ExploreValue } from '@hypertrace/observability';
1817
import { ObservabilityTableCellType } from '../../observability-table-cell-type';
1918

2019
interface CellData {

0 commit comments

Comments
 (0)