You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running across this issue with both set and update. If part of the submitted data contains a new node whose value is null, the mock data returned includes that node when it should not. Here's a sample test to demonstrate:
test/unit/firebase.js:
describe('#set',function(){beforeEach(function(){ref.autoFlush();});it('should not create children which have null values',function(){vardataToSet={a: 'test',f: null},dataToExpect={a: 'test'};ref.set(dataToSet);expect(ref.getData()).to.deep.equal(dataToExpect);});});
output:
1) MockFirebase #set should not create children which have null values:
AssertionError: expected { a: 'test', f: null } to deeply equal { a: 'test' }
+ expected - actual
{
"a": "test"
- "f": [null]
}
The text was updated successfully, but these errors were encountered:
I'm running across this issue with both
set
andupdate
. If part of the submitted data contains a new node whose value isnull
, the mock data returned includes that node when it should not. Here's a sample test to demonstrate:test/unit/firebase.js:
output:
The text was updated successfully, but these errors were encountered: