Skip to content

Commit

Permalink
test(core): update broker bus channel return type test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-sa committed Nov 29, 2023
1 parent c25ceb1 commit 03ddbbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/lib/types-builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,17 @@ describe('TypesBuilder', () => {
expect(type).toMatchInlineSnapshot(`"String!"`);
});

test('BrokerBus return type', () => {
test('BrokerBusChannel return type', () => {
type UserCreatedEvent = { type: 'user-created'; id: number };

// @ts-expect-error type only
function test(): BrokerBus<UserCreatedEvent> {}
function test(): BrokerBusChannel<UserCreatedEvent> {}

const reflectionMethod = ReflectionMethod.from(test);
const returnType = reflectionMethod.getReturnType();

const type = builder.createReturnType(returnType);
expect(type).toMatchInlineSnapshot(`"BrokerBus!"`);
expect(type).toMatchInlineSnapshot(`"UserCreatedEvent!"`);
});

test('interface array', () => {
Expand Down

0 comments on commit 03ddbbc

Please sign in to comment.