Skip to content

Commit

Permalink
Merge pull request #28 from biothings/fix_issue_26
Browse files Browse the repository at this point in the history
test: ✅ update clinical risk kp test
  • Loading branch information
kevinxin90 authored Feb 1, 2021
2 parents 5eb3fef + 17ff488 commit 383fc0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions __test__/integration/TRAPIv1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Testing endpoints", () => {
const clinical_risk_kp_folder = path.resolve(__dirname, '../../examples/v1/multiomics/clinical_risk_kp');
const old_spec_folder = path.resolve(__dirname, "../../examples/v0.9.2");
const invalid_example_folder = path.resolve(__dirname, "../../examples/v1/invalid");
const drugexposue2disease_query = JSON.parse(fs.readFileSync(path.join(clinical_risk_kp_folder, 'query_drug_exposure_to_disease.json')));
const drug2disease_query = JSON.parse(fs.readFileSync(path.join(clinical_risk_kp_folder, 'query_drug_to_disease.json')));
const gene2chemical_query = JSON.parse(fs.readFileSync(path.join(example_foler, 'query_chemicals_physically_interacts_with_genes.json')));
const disease2gene_query = JSON.parse(fs.readFileSync(path.join(example_foler, 'query_genes_relate_to_disease.json')));
const query_using_earlier_trapi_spec = JSON.parse(fs.readFileSync(path.join(old_spec_folder, 'query_genes_relate_to_disease.json')));
Expand Down Expand Up @@ -59,7 +59,7 @@ describe("Testing endpoints", () => {
test("POST /v1/query with clinical risk kp query", async () => {
await request(app)
.post("/v1/query")
.send(drugexposue2disease_query)
.send(drug2disease_query)
.set('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
Expand All @@ -68,7 +68,7 @@ describe("Testing endpoints", () => {
expect(response.body.message).toHaveProperty("knowledge_graph");
expect(response.body.message.knowledge_graph).toHaveProperty("nodes");
expect(response.body.message.knowledge_graph).toHaveProperty("edges");
expect(response.body.message.knowledge_graph.nodes).toHaveProperty("MONDO:0005249")
expect(response.body.message.knowledge_graph.nodes).toHaveProperty("MONDO:0008315")
})
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"query_graph": {
"nodes": {
"n0": {
"category": "biolink:DrugExposure",
"id": "NCIT:C18059"
"category": "biolink:Drug",
"id": "CHEBI:86990"
},
"n3": {
"category": "biolink:DiseaseOrPhenotypicFeature"
"category": "biolink:Disease"
}
},
"edges": {
Expand Down

0 comments on commit 383fc0c

Please sign in to comment.