array.js 454 B

1234567891011121314
  1. 'use strict'
  2. module.exports = {
  3. toArray: test => {
  4. const toArray = require('../lib/array').toArray
  5. test.ok(typeof toArray === 'function', 'toArray should be a function')
  6. test.ok(Array.isArray(toArray()), 'should return an array')
  7. test.ok(!Array.isArray(arguments), 'arguments should not be an array')
  8. test.ok(Array.isArray(toArray(arguments)), 'arguments should not be an array')
  9. test.done()
  10. }
  11. }