Skip to content

Commit

Permalink
fix StudyViewUtils unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
qlu-cls committed Aug 24, 2023
1 parent 1496780 commit 0665599
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/studyView/StudyViewUtils.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3034,13 +3034,15 @@ describe('StudyViewUtils', () => {
describe('getCNAByAlteration', () => {
it('return proper string from proper alteration', () => {
assert.isTrue(getCNAByAlteration(-2) === 'HOMDEL');
assert.isTrue(getCNAByAlteration(-1) === 'HETLOSS');
assert.isTrue(getCNAByAlteration(0) === 'DIPLOID');
assert.isTrue(getCNAByAlteration(1) === 'GAIN');
assert.isTrue(getCNAByAlteration(2) === 'AMP');
});

it('return empty string when alteration is not 2 or -2', () => {
assert.isTrue(getCNAByAlteration(0) === '');
assert.isTrue(getCNAByAlteration(1) === '');
assert.isTrue(getCNAByAlteration(-1) === '');
it('return empty string when alteration is not valid', () => {
assert.isTrue(getCNAByAlteration(3) === '');
assert.isTrue(getCNAByAlteration(-1.2) === '');
});
});

Expand Down

0 comments on commit 0665599

Please sign in to comment.