Skip to content

Commit

Permalink
Fix parentId in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Oct 24, 2021
1 parent 6758a18 commit f9f09ef
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions lib/instrumenter/src/instrumenter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,25 @@ describe('Instrumenter', () => {
expect.objectContaining({ id: 'kind--story [0] fn1', parentId: undefined })
);
expect(callSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'kind--story [1] fn2', parentId: 'kind--story [0] fn1' })
expect.objectContaining({
id: 'kind--story [0] fn1 [0] fn2',
parentId: 'kind--story [0] fn1',
})
);
expect(callSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'kind--story [2] fn3', parentId: 'kind--story [1] fn2' })
expect.objectContaining({
id: 'kind--story [0] fn1 [0] fn2 [0] fn3',
parentId: 'kind--story [0] fn1 [0] fn2',
})
);
expect(callSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'kind--story [3] fn4', parentId: 'kind--story [0] fn1' })
expect.objectContaining({
id: 'kind--story [0] fn1 [1] fn4',
parentId: 'kind--story [0] fn1',
})
);
expect(callSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'kind--story [4] fn5', parentId: undefined })
expect.objectContaining({ id: 'kind--story [1] fn5', parentId: undefined })
);
});

Expand All @@ -235,10 +244,13 @@ describe('Instrumenter', () => {
expect.objectContaining({ id: 'kind--story [0] fn1', parentId: undefined })
);
expect(callSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'kind--story [1] fn2', parentId: 'kind--story [0] fn1' })
expect.objectContaining({
id: 'kind--story [0] fn1 [0] fn2',
parentId: 'kind--story [0] fn1',
})
);
expect(callSpy).toHaveBeenCalledWith(
expect.objectContaining({ id: 'kind--story [2] fn3', parentId: undefined })
expect.objectContaining({ id: 'kind--story [1] fn3', parentId: undefined })
);
});

Expand Down

0 comments on commit f9f09ef

Please sign in to comment.