Skip to content

Commit

Permalink
Add test cases for #272
Browse files Browse the repository at this point in the history
  • Loading branch information
jihchi committed Nov 20, 2023
1 parent 61dec29 commit 91f0ff1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/kitchensink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,24 @@ describe('app', () => {
});
});

describe('Fixed #272, ER diagram', () => {
const encodedPath = 'pako:eNpFjrEKwzAMRH_F3FjyBd4CXTt1a9VBxEpqiO3gyEMJ_ve4SaE36R6H7jYMyQksJF89T5kDRdPUPwn9hfAy2wm-WjX7OJn-JJUiOgTJgb1rH44gQd8ShGDb6WTkMiuBYm1RLprunzjAai7SoSyOVX61sCPPa6MLx0dKfy_Oa8q3c-Uxtu7OaTo4';

test('img', async () => {
const resp = await request.get(`/img/${encodedPath}`);
expect(resp.status).toEqual(200);
expect(resp.type).toEqual('image/jpeg');
expect(resp.body.length).toBeGreaterThan(2 * KB);
});

test('svg', async () => {
const resp = await request.get(`/svg/${encodedPath}`);
expect(resp.status).toEqual(200);
expect(resp.type).toEqual('image/svg+xml');
expect(resp.body.length).toBeGreaterThan(4 * KB);
});
});

describe('CORS', () => {
const crossOrigin = 'http://cross.origin.com';

Expand Down

0 comments on commit 91f0ff1

Please sign in to comment.