src: Implement BigInt support, remove nodejs 8

This commit is contained in:
Vlad Frangu 2019-05-02 13:52:55 +03:00
parent 373605e40d
commit 8d979dd8a5
No known key found for this signature in database
GPG key ID: 549A660965A303E9
5 changed files with 43 additions and 12 deletions

View file

@ -2,7 +2,6 @@ import fs from 'fs';
import net from 'net';
import Stream from 'stream';
import util from 'util';
import {URL} from 'url';
import tempy from 'tempy';
import test, {ExecutionContext} from 'ava';
import {JSDOM} from 'jsdom';
@ -69,6 +68,17 @@ const types = new Map<string, Test>([
],
typename: TypeName.number
}],
['bigint', {
is: is.bigint,
fixtures: [
1n,
0n,
-0n,
// eslint-disable-next-line new-cap
BigInt('1234')
],
typename: TypeName.bigint
}],
['boolean', {
is: is.boolean,
fixtures: [
@ -311,6 +321,20 @@ const types = new Map<string, Test>([
],
typename: TypeName.Float64Array
}],
['bigint64Array', {
is: is.bigint64Array,
fixtures: [
new BigInt64Array()
],
typename: TypeName.BigInt64Array
}],
['biguint64Array', {
is: is.biguint64Array,
fixtures: [
new BigUint64Array()
],
typename: TypeName.BigUint64Array
}],
['arrayBuffer', {
is: is.arrayBuffer,
fixtures: [