1 | 'use strict';
|
2 | var $ = require('../internals/export');
|
3 | var fromAsync = require('../internals/array-from-async');
|
4 | var fails = require('../internals/fails');
|
5 |
|
6 | var nativeFromAsync = Array.fromAsync;
|
7 |
|
8 | var INCORRECT_CONSTRUCTURING = !nativeFromAsync || fails(function () {
|
9 | var counter = 0;
|
10 | nativeFromAsync.call(function () {
|
11 | counter++;
|
12 | return [];
|
13 | }, { length: 0 });
|
14 | return counter !== 1;
|
15 | });
|
16 |
|
17 |
|
18 |
|
19 | $({ target: 'Array', stat: true, forced: INCORRECT_CONSTRUCTURING }, {
|
20 | fromAsync: fromAsync
|
21 | });
|