Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

test.js 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. var test = require('tape')
  2. var ista = require('./')
  3. test('strict', function(t) {
  4. t.ok(ista.strict(new Int8Array), 'Int8Array')
  5. t.ok(ista.strict(new Int16Array), 'Int16Array')
  6. t.ok(ista.strict(new Int32Array), 'Int32Array')
  7. t.ok(ista.strict(new Uint8Array), 'Uint8Array')
  8. t.ok(ista.strict(new Uint16Array), 'Uint16Array')
  9. t.ok(ista.strict(new Uint32Array), 'Uint32Array')
  10. t.ok(ista.strict(new Float32Array), 'Float32Array')
  11. t.ok(ista.strict(new Float64Array), 'Float64Array')
  12. t.ok(!ista.strict(new Array), 'Array')
  13. t.ok(!ista.strict([]), '[]')
  14. t.end()
  15. })
  16. test('loose', function(t) {
  17. t.ok(ista.loose(new Int8Array), 'Int8Array')
  18. t.ok(ista.loose(new Int16Array), 'Int16Array')
  19. t.ok(ista.loose(new Int32Array), 'Int32Array')
  20. t.ok(ista.loose(new Uint8Array), 'Uint8Array')
  21. t.ok(ista.loose(new Uint16Array), 'Uint16Array')
  22. t.ok(ista.loose(new Uint32Array), 'Uint32Array')
  23. t.ok(ista.loose(new Float32Array), 'Float32Array')
  24. t.ok(ista.loose(new Float64Array), 'Float64Array')
  25. t.ok(!ista.loose(new Array), 'Array')
  26. t.ok(!ista.loose([]), '[]')
  27. t.end()
  28. })