项目原始demo,不改动
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Este repositorio está archivado. Puede ver los archivos y clonarlo, pero no puede subir cambios o reportar incidencias ni pedir Pull Requests.
 
 
 
 

35 líneas
735 B

  1. 'use strict';
  2. var GetIntrinsic = require('../GetIntrinsic');
  3. var test = require('tape');
  4. var forEach = require('foreach');
  5. var debug = require('object-inspect');
  6. var v = require('./helpers/values');
  7. test('export', function (t) {
  8. t.equal(typeof GetIntrinsic, 'function', 'it is a function');
  9. t.equal(GetIntrinsic.length, 2, 'function has length of 2');
  10. t.end();
  11. });
  12. test('throws', function (t) {
  13. t['throws'](
  14. function () { GetIntrinsic('not an intrinsic'); },
  15. SyntaxError,
  16. 'nonexistent intrinsic throws a syntax error'
  17. );
  18. forEach(v.nonBooleans, function (nonBoolean) {
  19. t['throws'](
  20. function () { GetIntrinsic('%', nonBoolean); },
  21. TypeError,
  22. debug(nonBoolean) + ' is not a Boolean'
  23. );
  24. });
  25. t.end();
  26. });