Skip to content

Commit a9ecad3

Browse files
committed
Small bug fix before dev-0.3 release
1 parent 0304c06 commit a9ecad3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module.exports = function(config) {
2727

2828
// list of files to exclude
2929
exclude: [
30+
'test/**/GraphConnector.spec.js'
3031
],
3132

3233
// preprocess matching files before serving them to the browser
@@ -61,7 +62,7 @@ module.exports = function(config) {
6162

6263
// start these browsers
6364
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
64-
browsers: ['Chrome'],
65+
browsers: ['PhantomJS'],
6566

6667
// Continuous Integration mode
6768
// if true, Karma captures browsers, runs the tests and exits

src/utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ export function emptyObject(object) {
4747
*/
4848
export function deepClone(obj) {
4949
//TODO: simple but inefficient JSON deep clone...
50-
return JSON.parse(JSON.stringify(obj));
50+
if (obj) return JSON.parse(JSON.stringify(obj));
5151
}

test/SyncherManager.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ describe('SyncherManager', function() {
293293
let compacted = false;
294294

295295
let sync = new Syncher(hyperURL1, bus, { runtimeURL: runtimeURL });
296-
let observer = new DataObjectObserver(hyperURL1, objURL, schemaURL, bus, 'on', {}, []);
296+
let observer = new DataObjectObserver(hyperURL1, objURL, schemaURL, bus, 'on', {}, [], 0);
297297
sync.observers[objURL] = observer;
298298

299299
observer.onChange('*', (event) => {
@@ -608,6 +608,7 @@ describe('SyncherManager', function() {
608608
dor.onAddChildren((event) => {
609609
let children1 = dor.children[event.childId];
610610
children1.onChange((changeEvent) => {
611+
console.log('onChange: ', changeEvent);
611612
expect(changeEvent).to.eql({ cType: 'update', oType: 'object', field: 'message', data: 'Hello Luis!' });
612613
expect(children1.data).to.eql({ message: 'Hello Luis!' });
613614
done();

0 commit comments

Comments
 (0)