mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
test passing with repeater.count
This commit is contained in:
parent
ec12285c9d
commit
26ed747588
2 changed files with 8 additions and 3 deletions
|
|
@ -10,11 +10,12 @@ Matcher.addMatcher = function(name, matcher) {
|
|||
$scenario.addFuture(
|
||||
'expect ' + future.name + ' ' + name + ' ' + expected,
|
||||
function(done){
|
||||
if (matcher(future.value, expected))
|
||||
if (!matcher(future.value, expected))
|
||||
throw "Expected " + expected + ' but was ' + future.value;
|
||||
done();
|
||||
}
|
||||
);
|
||||
dump('future added');
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,12 @@ describe("DSL", function() {
|
|||
var future = repeater('.repeater-row').count();
|
||||
expect(future.name).toEqual("repeater '.repeater-row' count");
|
||||
executeFuture(future, "<div class='repeater-row'>a</div>" +
|
||||
"<div class='repeater-row'>b</div>");
|
||||
Expect(future).toEqual(2);
|
||||
"<div class='repeater-row'>b</div>",
|
||||
function(value) {
|
||||
future.fulfill(value);
|
||||
});
|
||||
expect(future.fulfilled).toBeTruthy();
|
||||
expect(future.value).toEqual(2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue