MCPcopy Create free account
hub / github.com/es-shims/Promise.prototype.finally / assertArray

Function assertArray

test/tests.js:3–11  ·  view source on GitHub ↗
(t, value, length, assertType)

Source from the content-addressed store, hash-verified

1'use strict';
2
3var assertArray = function (t, value, length, assertType) {
4 t.ok(Array.isArray(value), 'value is an array');
5 t.equal(value.length, length, 'length is ' + length);
6 if (typeof assertType === 'function') {
7 for (var i = 0; i < value.length; i += 1) {
8 assertType(value[i]);
9 }
10 }
11};
12
13module.exports = function (promiseFinally, t) {
14 if (typeof Promise !== 'function') {

Callers 2

tests.jsFile · 0.85
rejectedPromiseCatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected