Skip to content

Commit

Permalink
Merge pull request #19 from canjs/good-test
Browse files Browse the repository at this point in the history
Fix QUnit.ok usages
  • Loading branch information
andrejewski authored Jan 9, 2018
2 parents c728562 + 3e50ff8 commit f4e200d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions can-stache-key-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,12 @@ test("foundObservable called with observable object (#7)", function(){

test("can read from strings", function(){
var context = " hi there ";

var result = observeReader.read(context,observeReader.reads("trim"),{});
QUnit.ok(result, context.trim);
QUnit.equal(
result.value(context),
context.trim(context),
'trim method works'
);
});

test("read / write to DefineMap", function(){
Expand Down Expand Up @@ -254,5 +257,5 @@ testHelpers.dev.devOnlyTest("a warning is given for `callMethodsOnObservables: t
callMethodsOnObservables: true
});

QUnit.ok(teardown(), 1, "warning displayed");
QUnit.equal(teardown(), 1, "warning displayed");
});

0 comments on commit f4e200d

Please sign in to comment.