mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-22 16:16:51 +01:00
Add support for typed arrays (#5905)
This commit is contained in:
committed by
Simon Brunel
parent
7e429a8fc6
commit
c8ce3d2018
@@ -1,4 +1,8 @@
|
||||
parserOptions:
|
||||
ecmaVersion: 5 # don't rely on default, since its changed by env: es6
|
||||
|
||||
env:
|
||||
es6: true # also changes default ecmaVersion to 6
|
||||
jasmine: true
|
||||
|
||||
globals:
|
||||
|
||||
@@ -21,6 +21,15 @@ describe('Chart.helpers.core', function() {
|
||||
expect(helpers.isArray([42])).toBeTruthy();
|
||||
expect(helpers.isArray(new Array())).toBeTruthy();
|
||||
expect(helpers.isArray(Array.prototype)).toBeTruthy();
|
||||
expect(helpers.isArray(new Int8Array(2))).toBeTruthy();
|
||||
expect(helpers.isArray(new Uint8Array())).toBeTruthy();
|
||||
expect(helpers.isArray(new Uint8ClampedArray([128, 244]))).toBeTruthy();
|
||||
expect(helpers.isArray(new Int16Array())).toBeTruthy();
|
||||
expect(helpers.isArray(new Uint16Array())).toBeTruthy();
|
||||
expect(helpers.isArray(new Int32Array())).toBeTruthy();
|
||||
expect(helpers.isArray(new Uint32Array())).toBeTruthy();
|
||||
expect(helpers.isArray(new Float32Array([1.2]))).toBeTruthy();
|
||||
expect(helpers.isArray(new Float64Array([]))).toBeTruthy();
|
||||
});
|
||||
it('should return false if value is not an array', function() {
|
||||
expect(helpers.isArray()).toBeFalsy();
|
||||
|
||||
Reference in New Issue
Block a user