Skip to content

Commit

Permalink
test: fix mock typing
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Sep 13, 2024
1 parent fa81f31 commit 1101155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/library-authoring/data/api.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ mockCreateLibraryBlock.newHtmlData = {
displayName: 'New Text Component',
hasUnpublishedChanges: true,
tagsCount: 0,
} satisfies api.CreateBlockDataResponse;
} satisfies api.LibraryBlockMetadata;

Check failure on line 130 in src/library-authoring/data/api.mocks.ts

View workflow job for this annotation

GitHub Actions / tests (18)

Type '{ id: string; defKey: string; blockType: string; displayName: string; hasUnpublishedChanges: true; tagsCount: number; }' does not satisfy the expected type 'LibraryBlockMetadata'.

Check failure on line 130 in src/library-authoring/data/api.mocks.ts

View workflow job for this annotation

GitHub Actions / tests (20)

Type '{ id: string; defKey: string; blockType: string; displayName: string; hasUnpublishedChanges: true; tagsCount: number; }' does not satisfy the expected type 'LibraryBlockMetadata'.
mockCreateLibraryBlock.newProblemData = {
id: 'lb:Axim:TEST:problem:prob1',
defKey: 'prob1',
blockType: 'problem',
displayName: 'New Problem',
hasUnpublishedChanges: true,
tagsCount: 0,
} satisfies api.CreateBlockDataResponse;
} satisfies api.LibraryBlockMetadata;

Check failure on line 138 in src/library-authoring/data/api.mocks.ts

View workflow job for this annotation

GitHub Actions / tests (18)

Type '{ id: string; defKey: string; blockType: string; displayName: string; hasUnpublishedChanges: true; tagsCount: number; }' does not satisfy the expected type 'LibraryBlockMetadata'.

Check failure on line 138 in src/library-authoring/data/api.mocks.ts

View workflow job for this annotation

GitHub Actions / tests (20)

Type '{ id: string; defKey: string; blockType: string; displayName: string; hasUnpublishedChanges: true; tagsCount: number; }' does not satisfy the expected type 'LibraryBlockMetadata'.
/** Apply this mock. Returns a spy object that can tell you if it's been called. */
mockCreateLibraryBlock.applyMock = () => (
jest.spyOn(api, 'createLibraryBlock').mockImplementation(mockCreateLibraryBlock)
Expand Down

0 comments on commit 1101155

Please sign in to comment.