Skip to content

Commit 83a690d

Browse files
committed
add test
1 parent 8a36350 commit 83a690d

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

test/routes/report/variants.test.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,50 @@ describe('/reports/{REPORTID}/variants', () => {
887887
await db.models.report.destroy({where: {ident: reportIdent.ident}});
888888
});
889889

890+
test('LOF promotion: Qualifying mutation-type matches not promoted if no-lof variant on tumour suppressor gene found - OK', async () => {
891+
// TA1 - expect lof promotion to occur - table 1
892+
const newMockReportData = JSON.parse(JSON.stringify(mockReportData));
893+
newMockReportData.genes = newMockReportData.genes.concat([{
894+
name: 'TA1gene',
895+
tumourSuppressor: true,
896+
}]);
897+
newMockReportData.kbMatches = newMockReportData.kbMatches.concat([{
898+
category: 'therapeutic',
899+
variantType: 'mut',
900+
variant: 'TA1',
901+
iprEvidenceLevel: 'IPR-A',
902+
kbVariant: 'TA1 mutation',
903+
matchedCancer: true,
904+
relevance: 'sensitivity',
905+
evidenceLevel: 'table 1',
906+
kbVariantId: '#26',
907+
kbStatementId: '#26',
908+
},
909+
{
910+
category: 'biological',
911+
variantType: 'mut',
912+
variant: 'TA1',
913+
iprEvidenceLevel: 'IPR-A',
914+
kbVariant: 'TA1 frameshift mutation',
915+
matchedCancer: true,
916+
relevance: 'no loss of function',
917+
evidenceLevel: 'table 2',
918+
kbVariantId: '#27',
919+
kbStatementId: '#27',
920+
}]);
921+
newMockReportData.smallMutations = newMockReportData.smallMutations.concat([{
922+
gene: 'TA1gene',
923+
key: 'TA1',
924+
displayName: 'TA1',
925+
}]);
926+
927+
const reportIdent = await createReport(newMockReportData);
928+
929+
const table = await checkRapidReportTable(reportIdent.ident, 'TA1', 'mut');
930+
expect(table).toBe('cancerRelevance');
931+
await db.models.report.destroy({where: {ident: reportIdent.ident}});
932+
});
933+
890934
test('LOF promotion: Mutation-type matches not promoted if no lof variant - OK', async () => {
891935
const newMockReportData = JSON.parse(JSON.stringify(mockReportData));
892936
newMockReportData.genes = newMockReportData.genes.concat([{

0 commit comments

Comments
 (0)