Skip to content
Merged
Show file tree
Hide file tree
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
138 changes: 79 additions & 59 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@
"typescript-eslint": "^8.57.1",
"uuid": "^13.0.0",
"vite": "^7.3.1",
"vitest": "4.0.18"
"vitest": "4.1.0"
}
}
20 changes: 10 additions & 10 deletions website/src/components/Edit/EditableSequences.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ describe('EditableSequences', () => {
]);
}

expect(() =>
editableSequences.update('another key', 'GG', 'another key', 'FASTAHEADER_anotherkey'),
).toThrowError('Maximum limit reached — you can add up to 1 sequence file(s) only.');
expect(() => editableSequences.update('another key', 'GG', 'another key', 'FASTAHEADER_anotherkey')).toThrow(
'Maximum limit reached — you can add up to 1 sequence file(s) only.',
);
editableSequences = editableSequences.update(firstKey, null, null, null);
expect(editableSequences.rows).toEqual([
{ label: 'Add a segment', value: null, fastaHeader: null, initialValue: null, key: expect.any(String) },
Expand Down Expand Up @@ -149,7 +149,7 @@ describe('EditableSequences', () => {
]);
}

expect(() => editableSequences.update('another key', 'GG', 'another key', 'anything')).toThrowError(
expect(() => editableSequences.update('another key', 'GG', 'another key', 'anything')).toThrow(
'Maximum limit reached — you can add up to 2 sequence file(s) only.',
);
expect(editableSequences.getFastaIds()).toEqual(`${FASTAHEADER} ${OTHER_FASTAHEADER}`);
Expand Down Expand Up @@ -206,9 +206,9 @@ describe('EditableSequences', () => {

const rows = editableSequences.rows;
expect(rows).deep.equals([{ label: key, value: SEQUENCE, initialValue: null, fastaHeader: FASTAHEADER, key }]);
expect(() =>
editableSequences.update('another key', OTHER_SEQUENCE, OTHER_LABEL, OTHER_FASTAHEADER),
).toThrowError('Maximum limit reached — you can add up to 1 sequence file(s) only.');
expect(() => editableSequences.update('another key', OTHER_SEQUENCE, OTHER_LABEL, OTHER_FASTAHEADER)).toThrow(
'Maximum limit reached — you can add up to 1 sequence file(s) only.',
);
});

test('GIVEN MAX_SEQUENCES_PER_ENTRY is 1 THEN only allows 1 input and fasta header does not contain the segment name', async () => {
Expand All @@ -230,9 +230,9 @@ describe('EditableSequences', () => {

const rows = editableSequences.rows;
expect(rows).deep.equals([{ label: LABEL, value: SEQUENCE, initialValue: null, fastaHeader: key, key }]);
expect(() =>
editableSequences.update('another key', OTHER_SEQUENCE, OTHER_LABEL, OTHER_FASTAHEADER),
).toThrowError('Maximum limit reached — you can add up to 1 sequence file(s) only.');
expect(() => editableSequences.update('another key', OTHER_SEQUENCE, OTHER_LABEL, OTHER_FASTAHEADER)).toThrow(
'Maximum limit reached — you can add up to 1 sequence file(s) only.',
);
});

test('GIVEN no initial data and max 2 seq per entry WHEN I add and remove a sequence THEN input is also removed again', () => {
Expand Down
Loading