Skip to content

Commit

Permalink
test logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoji Chen committed Jun 19, 2019
1 parent b94dab5 commit 011e3fa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/modules/core/lib/deck.spec.js
@@ -1,5 +1,5 @@
import test from 'tape-catch';
import {Deck} from '@deck.gl/core';
import {Deck, log} from '@deck.gl/core';
import {ScatterplotLayer} from '@deck.gl/layers';
import {gl} from '@deck.gl/test-utils';

Expand Down Expand Up @@ -55,7 +55,10 @@ test('Deck#constructor', t => {
t.pass('Deck constructor did not throw');
});

test('Deck#picking', t => {
test('Deck#rendering, picking, logging', t => {
// Test logging functionalities
log.priority = 4;

const deck = new Deck({
gl,
width: 1,
Expand All @@ -77,7 +80,7 @@ test('Deck#picking', t => {
})
],

onLoad: () => {
onAfterRender: () => {
const info = deck.pickObject({x: 0, y: 0});
t.is(info && info.index, 1, 'Picked object');

Expand All @@ -88,6 +91,8 @@ test('Deck#picking', t => {
t.is(infos.length, 1, 'Picked objects');

deck.finalize();
log.priority = 0;

t.end();
}
});
Expand Down

0 comments on commit 011e3fa

Please sign in to comment.