add a Jasmine toBeA matcher

This commit is contained in:
Éric Lemoine
2012-06-20 11:44:23 +02:00
parent 02840ad573
commit a7a86bb169
7 changed files with 89 additions and 78 deletions

View File

@@ -0,0 +1,8 @@
beforeEach(function() {
var parent = this.getMatchersClass_();
this.addMatchers({
toBeA: function(type) {
return this.actual instanceof type;
}
});
});