Skip to content

Commit

Permalink
added test for null field value
Browse files Browse the repository at this point in the history
  • Loading branch information
archangel-irk committed Jun 18, 2015
1 parent 80e6d6c commit 916f251
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/nested.basic-properties.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ describe('Basic properties', function () {
}, 'When calling ko.track, you must pass an object as the first parameter.');
});

it('`null` is valid field value', function () {
var obj = { key: null };
ko.track(obj, { deep: true });

var result = toHaveObservableProperties( obj, ['key'] );
assert.strictEqual( result, true, result.message );
});

it('makes all properties observable, given no args', function() {
var child = { },
obj = { a: 'string', b: 123, c: true, d: child };
Expand Down

0 comments on commit 916f251

Please sign in to comment.