2
0

to-array.js 413 B

12345678910111213
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. var o = [1, 2, 3];
  4. a(t(o), o, "Array");
  5. a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String");
  6. a.deep(t((function () { return arguments; }(3, o, 'raz'))),
  7. [3, o, 'raz'], "Arguments");
  8. a.deep(t((function () { return arguments; }(3))), [3],
  9. "Arguments with one numeric value");
  10. a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other");
  11. };