Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Oct 5, 2023
1 parent a90de6b commit a714b16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 35 deletions.
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
"@stdlib/array-typed-ctors": "^0.1.0",
"@stdlib/array-zeros": "^0.1.0",
"@stdlib/assert-is-nonnegative-integer": "^0.1.0",
"@stdlib/assert-is-uint8array": "^0.1.0",
"@stdlib/assert-is-uint8array": "^0.1.1",
"@stdlib/buffer-alloc-unsafe": "^0.1.0",
"@stdlib/ndarray-base-bytes-per-element": "^0.1.0",
"@stdlib/string-format": "^0.1.0",
"@stdlib/string-format": "^0.1.1",
"@stdlib/types": "^0.1.0"
},
"devDependencies": {
Expand All @@ -61,8 +61,8 @@
"@stdlib/array-uint32": "^0.1.0",
"@stdlib/array-uint8": "^0.1.0",
"@stdlib/array-uint8c": "^0.1.0",
"@stdlib/assert-instance-of": "^0.1.0",
"@stdlib/assert-is-array": "^0.1.0",
"@stdlib/assert-instance-of": "^0.1.1",
"@stdlib/assert-is-array": "^0.1.1",
"@stdlib/assert-is-typed-array": "^0.1.0",
"@stdlib/assert-is-typed-array-like": "^0.1.0",
"@stdlib/bench": "^0.1.0",
Expand Down
33 changes: 3 additions & 30 deletions test/dist/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,13 @@
// MODULES //

var tape = require( 'tape' );
var proxyquire = require( 'proxyquire' );
var main = require( './../../dist/main.js' );
var polyfill = require( './../../dist/polyfill.js' );
var empty = require( './../../dist' );
var main = require( './../../dist' );


// TESTS //

tape( 'main export is a function', function test( t ) {
tape( 'main export is defined', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof empty, 'function', 'main export is a function' );
t.strictEqual( main !== void 0, true, 'main export is defined' );
t.end();
});

tape( 'if an environment supports Node.js buffer instances inheriting from Uint8Array, the main export supports returning arrays having uninitialized memory', function test( t ) {
var empty = proxyquire( './../dist', {
'./is_buffer_uint8array.js': mock
});
t.strictEqual( empty, main, 'returns expected value' );
t.end();

function mock() {
return true;
}
});

tape( 'if an environment does not support Node.js buffer instances inheriting from Uint8Array, the main export supports returning zero-filled arrays', function test( t ) {
var empty = proxyquire( './../dist', {
'./is_buffer_uint8array.js': mock
});
t.strictEqual( empty, polyfill, 'returns expected value' );
t.end();

function mock() {
return false;
}
});

0 comments on commit a714b16

Please sign in to comment.