Skip to content

Commit b596007

Browse files
committed
fix: test
1 parent 9fe12c0 commit b596007

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

mise.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ run = "vitest"
6363

6464
[tasks.e2e]
6565
depends = ["pnpm-install"]
66+
env = { _.file = '.env.test'}
6667
run = "jest --forceExit --verbose --coverage --silent --detectOpenHandles --maxWorkers=2"
6768

6869
[tasks.test]

src/services/item/plugins/file/itemFile.controller.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,11 @@ describe('File Item routes tests', () => {
567567
url: `${ITEMS_ROUTE_PREFIX}/${item.id}/download`,
568568
});
569569

570+
const res = await response.json();
570571
// we want the download file to wrap the error
571-
expect(response.json()).toMatchObject(new DownloadFileUnexpectedError(expect.anything()));
572+
expect(res.message).toEqual(
573+
new DownloadFileUnexpectedError({ filepath: item.extra['file'].path }).message,
574+
);
572575
});
573576
it('Gracefully fails if s3 returns NotFound error', async () => {
574577
headObjectMock.mockImplementation(() => {

0 commit comments

Comments
 (0)