1 import test from 'tape';
2 import nock from 'nock';
3 import * as Boxplotter from '../source/entries/boxplotter.js';
4 import data from './boxplotter.test.data.js';
8 document.querySelector('body').innerHTML = `<div id="bxplt"></div>`;
12 t.test("initialize", t=>{
15 boxplotter = Boxplotter.init("#bxplt");
19 t.test("populate", t=>{
22 var scope = nock(document.location.origin);
23 scope.get('/ajax/tools/boxplotter/get_constraints').query({dataset: 7})
24 .reply(200, data.constraints);
25 scope.post('/brapi/v1/phenotypes-search')
26 .reply(200, data.phenotypes);
29 t.ok(scope.isDone(),"expected calls made");
33 boxplotter.loadDatasetObsUnits(7,"plot");
34 },"loadDatasetObsUnits works");