项目原始demo,不改动
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este repositório está arquivado. Você pode visualizar os arquivos e realizar clone, mas não poderá realizar push nem abrir issues e pull requests.
 
 
 
 

20 linhas
591 B

  1. 'use strict';
  2. var MapPoly = require('../polyfill');
  3. module.exports = function (t, a) {
  4. var map;
  5. a.throws(function () { t(undefined); }, TypeError, "Undefined");
  6. a.throws(function () { t(null); }, TypeError, "Null");
  7. a.throws(function () { t(true); }, TypeError, "Primitive");
  8. a.throws(function () { t('raz'); }, TypeError, "String");
  9. a.throws(function () { t({}); }, TypeError, "Object");
  10. a.throws(function () { t([]); }, TypeError, "Array");
  11. if (typeof Map !== 'undefined') {
  12. map = new Map();
  13. a(t(map), map, "Native");
  14. }
  15. map = new MapPoly();
  16. a(t(map), map, "Polyfill");
  17. };