Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix utils: getTypedArray unit test. #23258

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions test/unit/src/utils.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ QUnit.module( 'utils', () => {

QUnit.test( 'getTypedArray', ( assert ) => {

assert.ok( getTypedArray( 'Int8Array', Buffer.from( '', 'utf8' ) ) instanceof Int8Array, 'Int8Array' );
assert.ok( getTypedArray( 'Uint8Array', Buffer.from( '', 'utf8' ) ) instanceof Uint8Array, 'Uint8Array' );
assert.ok( getTypedArray( 'Uint8ClampedArray', Buffer.from( '', 'utf8' ) ) instanceof Uint8ClampedArray, 'Uint8ClampedArray' );
assert.ok( getTypedArray( 'Int16Array', Buffer.from( '', 'utf8' ) ) instanceof Int16Array, 'Int16Array' );
assert.ok( getTypedArray( 'Uint16Array', Buffer.from( '', 'utf8' ) ) instanceof Uint16Array, 'Uint16Array' );
assert.ok( getTypedArray( 'Int32Array', Buffer.from( '', 'utf8' ) ) instanceof Int32Array, 'Int32Array' );
assert.ok( getTypedArray( 'Uint32Array', Buffer.from( '', 'utf8' ) ) instanceof Uint32Array, 'Uint32Array' );
assert.ok( getTypedArray( 'Float32Array', Buffer.from( '', 'utf8' ) ) instanceof Float32Array, 'Float32Array' );
assert.ok( getTypedArray( 'Float64Array', Buffer.from( '', 'utf8' ) ) instanceof Float64Array, 'Float64Array' );
assert.ok( getTypedArray( 'Int8Array', new ArrayBuffer() ) instanceof Int8Array, 'Int8Array' );
assert.ok( getTypedArray( 'Uint8Array', new ArrayBuffer() ) instanceof Uint8Array, 'Uint8Array' );
assert.ok( getTypedArray( 'Uint8ClampedArray', new ArrayBuffer() ) instanceof Uint8ClampedArray, 'Uint8ClampedArray' );
assert.ok( getTypedArray( 'Int16Array', new ArrayBuffer() ) instanceof Int16Array, 'Int16Array' );
assert.ok( getTypedArray( 'Uint16Array', new ArrayBuffer() ) instanceof Uint16Array, 'Uint16Array' );
assert.ok( getTypedArray( 'Int32Array', new ArrayBuffer() ) instanceof Int32Array, 'Int32Array' );
assert.ok( getTypedArray( 'Uint32Array', new ArrayBuffer() ) instanceof Uint32Array, 'Uint32Array' );
assert.ok( getTypedArray( 'Float32Array', new ArrayBuffer() ) instanceof Float32Array, 'Float32Array' );
assert.ok( getTypedArray( 'Float64Array', new ArrayBuffer() ) instanceof Float64Array, 'Float64Array' );

} );

Expand Down