Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Jun 5, 2020
1 parent 3cbb7d3 commit ec64094
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/json/src/transports/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const state = {
};

export default class Transport {
static setConnectionCallback({onInitialize, onFinalize, onMessage}) {
static setCallbacks({onInitialize, onFinalize, onMessage}) {
if (onInitialize) {
state.onInitialize = onInitialize;
}
Expand Down
9 changes: 4 additions & 5 deletions test/modules/json/transports/transport.spec.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import test from 'tape-catch';
import Transport from '@deck.gl/json/transports/transport';

test('delayed onInitialized()', t => {
const transportModule = require('@deck.gl/json/transports/transport');
const Transport = transportModule.default; // eslint-disable-line no-console,no-undef
const transport = new Transport();

transport.setCallbacks({
Transport.setCallbacks({
onInitialize: () => {
t.ok(true, 'onInitialize called');
t.end();
}
});

const transport = new Transport();
transport._initialize();
});

0 comments on commit ec64094

Please sign in to comment.