-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
209 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var assert = require('assert'); | ||
var rewire = require('rewire'); | ||
|
||
//Get load in the js | ||
var javascript = rewire('../../99999-fk4bz6hp15/v0.0.4/model/resource/recommendation.js'); | ||
|
||
//Load in the function | ||
var dosingrecommendation = javascript.__get__("dosingrecommendation"); | ||
|
||
|
||
var testset = [ | ||
{"input":{"CYP2C19": "Ultrarapid metabolizer"},"output":"classification" }, | ||
{"input":{"CYP2C19": "Intermediate metabolizer"},"output":"content" }, | ||
{"input":{"CYP2C19": "Poor metabolizer"},"output":"implication" } | ||
|
||
] | ||
|
||
describe('99999-fk4bz6hp15 v0.0.4', function () { | ||
|
||
describe('Valid inputs', function(){ | ||
|
||
testset.forEach(function(e, index){ | ||
|
||
it(e.input.CYP2C19, function(){ | ||
var result = dosingrecommendation(e.input) | ||
assert.equal(result.recommendation[e.output]!=null, true); | ||
}); | ||
|
||
}) | ||
|
||
}); | ||
|
||
describe('Invalid inputs', function(){ | ||
|
||
it('fields missing', function(){ | ||
var result = dosingrecommendation({}) | ||
assert.equal('Incorrect/invalid input.', result); | ||
}) | ||
|
||
it('incorrect phenotype', function(){ | ||
var result = dosingrecommendation({"CYP2C19": "Ultrarapid mettabolizer"}) | ||
assert.equal('Incorrect/invalid input for phenotype.', result); | ||
}) | ||
|
||
it('no input', function(){ | ||
var result = dosingrecommendation() | ||
assert.equal('Incorrect/invalid input.', result); | ||
}) | ||
|
||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
var assert = require('assert'); | ||
var rewire = require('rewire'); | ||
|
||
//Get load in the js | ||
var javascript = rewire('../../99999-fk4d22836k/v0.0.4/model/resource/recommendation.js'); | ||
|
||
//Load in the function | ||
var dosingrecommendation = javascript.__get__("dosingrecommendation"); | ||
|
||
|
||
var testset = [ | ||
{"input":{"CYP2C19": "Ultrarapid metabolizer"},"output":"classification" }, | ||
{"input":{"CYP2C19": "Normal metabolizer"},"output":"classification" }, | ||
{"input":{"CYP2C19": "Intermediate metabolizer"},"output":"content" }, | ||
{"input":{"CYP2C19": "Poor metabolizer"},"output":"implication" } | ||
|
||
] | ||
|
||
describe('99999-fk4d22836k v0.0.4', function () { | ||
|
||
describe('Valid inputs', function(){ | ||
|
||
testset.forEach(function(e, index){ | ||
|
||
it(e.input.CYP2C19, function(){ | ||
var result = dosingrecommendation(e.input) | ||
assert.equal(true, result.recommendation[e.output]!=null); | ||
}); | ||
|
||
}) | ||
|
||
}); | ||
|
||
describe('Invalid inputs', function(){ | ||
|
||
it('fields missing', function(){ | ||
var result = dosingrecommendation({}) | ||
assert.equal('Incorrect/invalid input.', result); | ||
}) | ||
|
||
it('incorrect phenotype', function(){ | ||
var result = dosingrecommendation({"CYP2C19": "Ultrarapid mettabolizer"}) | ||
assert.equal('Incorrect/invalid input for phenotype.', result); | ||
}) | ||
|
||
it('no input', function(){ | ||
var result = dosingrecommendation() | ||
assert.equal('Incorrect/invalid input.', result); | ||
}) | ||
|
||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var assert = require('assert'); | ||
var rewire = require('rewire'); | ||
|
||
//Get load in the js | ||
var javascript = rewire('../../99999-fk4d79nq4z/v0.0.4/model/resource/recommendation.js'); | ||
|
||
//Load in the function | ||
var dosingrecommendation = javascript.__get__("dosingrecommendation"); | ||
|
||
|
||
var testset = [ | ||
{"input":{"UGT1A1": "Normal metabolizer"},"output":"classification" }, | ||
{"input":{"UGT1A1": "Intermediate metabolizer"},"output":"content" }, | ||
{"input":{"UGT1A1": "Poor metabolizer"},"output":"implication" } | ||
|
||
] | ||
|
||
describe('99999-fk4d79nq4z v0.0.4', function () { | ||
|
||
describe('Valid inputs', function(){ | ||
|
||
testset.forEach(function(e, index){ | ||
|
||
it(e.input.UGT1A1, function(){ | ||
var result = dosingrecommendation(e.input) | ||
assert.equal(true, result.recommendation[e.output]!=null); | ||
}); | ||
|
||
}) | ||
|
||
}); | ||
|
||
describe('Invalid inputs', function(){ | ||
|
||
it('fields missing', function(){ | ||
var result = dosingrecommendation({}) | ||
assert.equal('Incorrect/invalid input.', result); | ||
}) | ||
|
||
it('incorrect phenotype', function(){ | ||
var result = dosingrecommendation({"UGT1A1": "Ultrarapid mettabolizer"}) | ||
assert.equal('Incorrect/invalid input for phenotype.', result); | ||
}) | ||
|
||
it('no input', function(){ | ||
var result = dosingrecommendation() | ||
assert.equal('Incorrect/invalid input.', result); | ||
}) | ||
|
||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var assert = require('assert'); | ||
var rewire = require('rewire'); | ||
|
||
//Get load in the js | ||
var javascript = rewire('../../99999-fk4mc97w6m/v0.0.4/model/resource/recommendation.js'); | ||
|
||
//Load in the function | ||
var dosingrecommendation = javascript.__get__("dosingrecommendation"); | ||
|
||
|
||
var testset = [ | ||
{"input":{"CYP2D6": "ultrarapid metabolizer"},"output":"classification" }, | ||
{"input":{"CYP2D6": "Normal metabolizer"},"output":"classification" }, | ||
{"input":{"CYP2D6": "Intermediate metabolizer"},"output":"content" }, | ||
{"input":{"CYP2D6": "Poor metabolizer"},"output":"implication" } | ||
] | ||
|
||
describe('99999-2d6codeine v0.0.4', function () { | ||
|
||
describe('Valid inputs', function(){ | ||
|
||
testset.forEach(function(e, index){ | ||
|
||
it(e.input.CYP2D6, function(){ | ||
var result = dosingrecommendation(e.input) | ||
assert.equal(result.recommendation[e.output]!=null, true); | ||
}); | ||
|
||
}) | ||
|
||
}); | ||
|
||
describe('Invalid inputs', function(){ | ||
|
||
it('fields missing', function(){ | ||
var result = dosingrecommendation({}) | ||
assert.equal(result, 'Incorrect/invalid input.'); | ||
}) | ||
|
||
it('incorrect phenotype', function(){ | ||
var result = dosingrecommendation({"CYP2D6": "Ultrarapid mettabolizer"}) | ||
assert.equal(result, 'Incorrect/invalid input for phenotype.'); | ||
}) | ||
|
||
it('no input', function(){ | ||
var result = dosingrecommendation() | ||
assert.equal(result, 'Incorrect/invalid input.'); | ||
}) | ||
|
||
}); | ||
|
||
}); |
This file was deleted.
Oops, something went wrong.