mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
This reverts commit d9b59def72.
Breaks downloadable source tarball builds as we remove some files prior
to creating a tarball but those files are included in the comprehensive
list of dependencies listed in .deps.
Ref: https://github.com/nodejs/node/pull/17407
PR-URL: https://github.com/nodejs/node/pull/18287
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
25 lines
692 B
JavaScript
25 lines
692 B
JavaScript
'use strict';
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
|
|
// Testing api calls for arrays
|
|
const test_dataview = require(`./build/${common.buildType}/test_dataview`);
|
|
|
|
// Test for creating dataview
|
|
{
|
|
const buffer = new ArrayBuffer(128);
|
|
const template = Reflect.construct(DataView, [buffer]);
|
|
|
|
const theDataview = test_dataview.CreateDataViewFromJSDataView(template);
|
|
assert.ok(theDataview instanceof DataView,
|
|
`Expect ${theDataview} to be a DataView`);
|
|
}
|
|
|
|
// Test for creating dataview with invalid range
|
|
{
|
|
const buffer = new ArrayBuffer(128);
|
|
assert.throws(() => {
|
|
test_dataview.CreateDataView(buffer, 10, 200);
|
|
}, RangeError);
|
|
}
|