Skip to content
Open
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "test-machinepack",
"author": "Mike McNeil <@mikermcneil>",
"version": "3.0.1",
"version": "3.0.2",
"description": "Raw test runner for machinepacks (also includes a simple stub test driver)",
"keywords": [
"test-machine",
Expand Down
2 changes: 1 addition & 1 deletion run-test-suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ module.exports = function (Pack, testSuite, eachTest, done){
// between pieces, and for use in decoding the expected output below.
var typeSchema;
try {
typeSchema = rttc.infer(exitDef.example);
typeSchema = rttc.infer(exitDef.outputExample);

// If it's present, now hydrate the `outputAssertion` for this test
// (the expected return value) in case it contains any stringified lamda functios
Expand Down
4 changes: 2 additions & 2 deletions test-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ module.exports = require('machine').build({
var exitDef = machineInstance.exits[whatActuallyHappened.outcome];
// and use it to infer the expected `typeSchema` in order to do a
// better comparison with isEqual().
if (_.isUndefined(exitDef.example)) {
if (_.isUndefined(exitDef.outputExample)) {
failureReport.wrongOutput = !rttc.isEqual(outputAssertion, whatActuallyHappened.output);
}
else {
var typeSchema = rttc.infer(exitDef.example);
var typeSchema = rttc.infer(exitDef.outputExample);
failureReport.wrongOutput = !rttc.isEqual(outputAssertion, whatActuallyHappened.output, typeSchema);
}
}
Expand Down