feat: Make stores return modified resources.

This commit is contained in:
Ruben Verborgh
2021-02-23 22:58:39 +01:00
committed by Joachim Van Herwegen
parent 28c0eb7e88
commit 6edc255707
23 changed files with 228 additions and 124 deletions

View File

@@ -7,7 +7,7 @@ describe('A DeleteOperationHandler', (): void => {
const store = {} as unknown as ResourceStore;
const handler = new DeleteOperationHandler(store);
beforeEach(async(): Promise<void> => {
store.deleteResource = jest.fn(async(): Promise<void> => undefined);
store.deleteResource = jest.fn(async(): Promise<any> => undefined);
});
it('only supports DELETE operations.', async(): Promise<void> => {

View File

@@ -9,7 +9,7 @@ describe('A PatchOperationHandler', (): void => {
const store = {} as unknown as ResourceStore;
const handler = new PatchOperationHandler(store);
beforeEach(async(): Promise<void> => {
store.modifyResource = jest.fn(async(): Promise<void> => undefined);
store.modifyResource = jest.fn(async(): Promise<any> => undefined);
});
it('only supports PATCH operations.', async(): Promise<void> => {

View File

@@ -10,7 +10,7 @@ describe('A PutOperationHandler', (): void => {
const handler = new PutOperationHandler(store);
beforeEach(async(): Promise<void> => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
store.setRepresentation = jest.fn(async(): Promise<void> => {});
store.setRepresentation = jest.fn(async(): Promise<any> => {});
});
it('only supports PUT operations.', async(): Promise<void> => {