Browse Source

Changed unit tests to use the compiled vis.js

flowchartTest
jos 9 years ago
parent
commit
783af7a561
3 changed files with 11 additions and 9 deletions
  1. +1
    -3
      lib/DataSet.js
  2. +5
    -3
      test/DataSet.test.js
  3. +5
    -3
      test/DataView.test.js

+ 1
- 3
lib/DataSet.js View File

@ -153,9 +153,7 @@ DataSet.prototype.subscribe = DataSet.prototype.on;
DataSet.prototype.off = function(event, callback) {
var subscribers = this._subscribers[event];
if (subscribers) {
this._subscribers[event] = subscribers.filter(function (listener) {
return (listener.callback != callback);
});
this._subscribers[event] = subscribers.filter(listener => listener.callback != callback);
}
};

+ 5
- 3
test/DataSet.test.js View File

@ -1,7 +1,9 @@
var assert = require('assert');
var moment = require('moment');
var DataSet = require('../lib/DataSet');
var Queue = require('../lib/Queue');
var vis = require('../dist/vis');
var moment = vis.moment;
var DataSet = vis.DataSet;
var Queue = vis.Queue;
// TODO: test the source code immediately, but this is ES6
var now = new Date();

+ 5
- 3
test/DataView.test.js View File

@ -1,7 +1,9 @@
var assert = require('assert');
var moment = require('moment');
var DataSet = require('../lib/DataSet');
var DataView = require('../lib/DataView');
var vis = require('../dist/vis');
var moment = vis.moment;
var DataSet = vis.DataSet;
var DataView = vis.DataView;
// TODO: test the source code immediately, but this is ES6
// TODO: improve DataView tests, split up in one test per function
describe('DataView', function () {

Loading…
Cancel
Save