-
Notifications
You must be signed in to change notification settings - Fork 331
/
index.js
39 lines (33 loc) · 1.37 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {acquireChart, addMatchers, releaseCharts, specsFromFixtures, triggerMouseEvent, afterEvent} from 'chartjs-test-utils';
import {testEvents, eventPoint0, getCenterPoint} from './events';
import {createCanvas, getAnnotationElements, getAnnotationInteractedElements, scatterChart, stringifyObject, interactionData, getQuadraticXY, getQuadraticAngle, drawStar} from './utils';
import * as helpers from '../src/helpers';
window.helpers = helpers;
window.devicePixelRatio = 1;
window.acquireChart = acquireChart;
window.afterEvent = afterEvent;
window.triggerMouseEvent = triggerMouseEvent;
window.testEvents = testEvents;
window.eventPoint0 = eventPoint0;
window.getCenterPoint = getCenterPoint;
window.createCanvas = createCanvas;
window.drawStar = drawStar;
window.getAnnotationElements = getAnnotationElements;
window.getAnnotationInteractedElements = getAnnotationInteractedElements;
window.scatterChart = scatterChart;
window.stringifyObject = stringifyObject;
window.interactionData = interactionData;
window.getQuadraticXY = getQuadraticXY;
window.getQuadraticAngle = getQuadraticAngle;
jasmine.fixtures = specsFromFixtures;
beforeAll(() => {
// Disable colors plugin for tests.
window.Chart.defaults.plugins.colors.enabled = false;
});
beforeEach(function() {
addMatchers();
});
afterEach(function() {
releaseCharts();
});
console.warn('Testing with chart.js v' + Chart.version);