Skip to content

Commit

Permalink
Added tests for ko.isSubscribable(null) and ko.isSubscribable(undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
bman654 committed Feb 23, 2013
1 parent 68a708f commit 7486e80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/subscribableBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ describe('Subscribable', function() {
expect(ko.isSubscribable(instance)).toEqual(true);
});

it('isSubscribable should return false for undefined', function () {
expect(ko.isSubscribable(undefined)).toEqual(false);
});

it('isSubscribable should return false for null', function () {
expect(ko.isSubscribable(null)).toEqual(false);
});

it('Should be able to notify subscribers', function () {
var instance = new ko.subscribable();
var notifiedValue;
Expand Down

0 comments on commit 7486e80

Please sign in to comment.