refactor: Assign properties directly to error.

This commit is contained in:
Ruben Verborgh
2021-07-12 17:24:08 +01:00
parent 8a62938c18
commit 649f7a9a78
4 changed files with 33 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ describe('A BaseIdentifierStrategy', (): void => {
expect((): any => strategy.getParentContainer({ path: '/unsupported' }))
.toThrow('The identifier /unsupported is outside the configured identifier space.');
expect((): any => strategy.getParentContainer({ path: '/unsupported' }))
.toThrow(expect.objectContaining({ options: { errorCode: 'E0001', details: { path: '/unsupported' }}}));
.toThrow(expect.objectContaining({ errorCode: 'E0001', details: { path: '/unsupported' }}));
});
it('errors when attempting to get the parent of a root container.', async(): Promise<void> => {