This repository has been archived by the owner on Oct 4, 2020. It is now read-only.
forked from almende/vis
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue 3321 by ensuring labels are drawn as part of initial cons… (
almende#3646) * Fixes issue 3321 by ensuring labels are drawn as part of initial construction of the DataAxis * Simplify test and remove support for node 6 * Exclude test coverage from regular test runs
- Loading branch information
1 parent
abc484a
commit 7d69231
Showing
6 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "7" | ||
env: | ||
- CXX=g++-4.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
var assert = require('assert'); | ||
var jsdom_global = require('jsdom-global'); | ||
var canvasMockify = require('./canvas-mock'); | ||
|
||
var DataAxis = require('../lib/timeline/component/DataAxis'); | ||
|
||
describe('DataAxis', function () { | ||
beforeEach(function() { | ||
this.jsdom_global = canvasMockify("<svg id='svg'></svg>"); | ||
this.svg = this.container = document.getElementById('svg'); | ||
this.body = { | ||
functions: {}, | ||
emitter: { | ||
on: function() {} | ||
} | ||
}; | ||
}); | ||
|
||
afterEach(function() { | ||
this.jsdom_global(); | ||
this.svg.remove(); | ||
this.svg = undefined; | ||
}); | ||
|
||
it('should work', function () { | ||
var dataAxis = new DataAxis(this.body, {}, this.svg, {}); | ||
|
||
}); | ||
|
||
describe('screenToValue', function () { | ||
it('can called be without an explicit redraw', function () { | ||
var dataAxis = new DataAxis(this.body, {}, this.svg, {}); | ||
assert(isNaN(dataAxis.screenToValue(77))); | ||
}); | ||
}); | ||
|
||
describe('convertValue', function () { | ||
it('can called be without an explicit redraw', function () { | ||
var dataAxis = new DataAxis(this.body, {}, this.svg, {}); | ||
assert(isNaN(dataAxis.convertValue(77))); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters