Skip to content

Commit eee202a

Browse files
author
Mint de Wit
committed
chore: test getSegment
1 parent e727028 commit eee202a

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

packages/job-worker/src/blueprints/__tests__/context-OnSetAsNextContext.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ describe('Test blueprint api context', () => {
5353
expect(mockActionService.getResolvedPieceInstances).toHaveBeenCalledWith('current')
5454
})
5555

56+
test('getSegment', async () => {
57+
const { context, mockActionService } = await getTestee()
58+
59+
await context.getSegment('current')
60+
expect(mockActionService.getSegment).toHaveBeenCalledTimes(1)
61+
expect(mockActionService.getSegment).toHaveBeenCalledWith('current')
62+
})
63+
5664
test('findLastPieceOnLayer', async () => {
5765
const { context, mockActionService } = await getTestee()
5866

packages/job-worker/src/blueprints/__tests__/context-OnTakeContext.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ describe('Test blueprint api context', () => {
5353
expect(mockActionService.getResolvedPieceInstances).toHaveBeenCalledWith('current')
5454
})
5555

56+
test('getSegment', async () => {
57+
const { context, mockActionService } = await getTestee()
58+
59+
await context.getSegment('current')
60+
expect(mockActionService.getSegment).toHaveBeenCalledTimes(1)
61+
expect(mockActionService.getSegment).toHaveBeenCalledWith('current')
62+
})
63+
5664
test('findLastPieceOnLayer', async () => {
5765
const { context, mockActionService } = await getTestee()
5866

packages/job-worker/src/blueprints/__tests__/context-adlibActions.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ describe('Test blueprint api context', () => {
5555
expect(mockActionService.getResolvedPieceInstances).toHaveBeenCalledWith('current')
5656
})
5757

58+
test('getSegment', async () => {
59+
const { context, mockActionService } = await getTestee()
60+
61+
await context.getSegment('current')
62+
expect(mockActionService.getSegment).toHaveBeenCalledTimes(1)
63+
expect(mockActionService.getSegment).toHaveBeenCalledWith('current')
64+
})
65+
5866
test('findLastPieceOnLayer', async () => {
5967
const { context, mockActionService } = await getTestee()
6068

0 commit comments

Comments
 (0)