Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions lapis-e2e/test/common.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,7 @@ describe('All endpoints', () => {
expectIsZstdEncoded(await response.arrayBuffer());
});

// TODO - These tests are failing in CI, so we're excluding them for now.
// Issue for it: https://github.com/GenSpectrum/LAPIS/issues/1423
it.skip('should return zstd compressed data when accepting compression in header', async () => {
it('should return zstd compressed data when accepting compression in header', async () => {
const urlParams = new URLSearchParams();
if (route.pathSegment === '/mostRecentCommonAncestor' || route.pathSegment === '/phyloSubtree') {
urlParams.set('phyloTreeField', 'usherTree');
Expand All @@ -221,7 +219,16 @@ describe('All endpoints', () => {
expect(response.status).equals(200);
expect(response.headers.get('content-type')).to.equal(expectedContentType(route.servesType));
expect(response.headers.get('content-encoding')).equals('zstd');
expectIsZstdEncoded(await response.arrayBuffer());

// fetch automatically decompresses zstd responses as of node 24
if (route.servesType === 'SEQUENCES') {
expect(await response.text()).to.match(/^>key_/);
} else if (route.servesType === 'TREE') {
expect(await response.text()).to.match(/NODE_\d+;$/);
} else {
const body = await response.json();
expect(body.data).is.an('array');
}
});

it('should return gzip compressed data when asking for compression', async () => {
Expand Down