Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: ✅ update clinical risk kp test #28

Merged
merged 1 commit into from
Feb 1, 2021
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
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
Loading