Skip to content

Commit

Permalink
fix(check): fix bug with async chekcs
Browse files Browse the repository at this point in the history
	The correct field to set on CheckResult is 'result' not 'value'
  • Loading branch information
justinhorvitz committed Nov 29, 2017
1 parent 740973d commit 441ca95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/core/utils/check-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ axe.utils.checkHelper = function checkHelper(checkResult, options, resolve, reje
this.isAsync = true;
return function (result) {
if (result instanceof Error === false) {
checkResult.value = result;
checkResult.result = result;
resolve(checkResult);
} else {
reject(result);
Expand Down
2 changes: 1 addition & 1 deletion test/core/base/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('Check', function () {
}
}).run(fixture, {}, function (d) {
assert.instanceOf(d, CheckResult);
assert.deepEqual(d.value, data);
assert.deepEqual(d.result, data);
done();
});

Expand Down

0 comments on commit 441ca95

Please sign in to comment.