IOTConnect-Web/node_modules/es6-map/test/lib/iterator.js

14 lines
444 B
JavaScript
Raw Permalink Normal View History

2024-05-09 01:49:52 +00:00
'use strict';
var Map = require('../../polyfill')
, toArray = require('es5-ext/array/to-array');
module.exports = function (T, a) {
var arr = [['raz', 'one'], ['dwa', 'two']], map = new Map(arr);
a.deep(toArray(new T(map)), arr, "Default");
a.deep(toArray(new T(map, 'key+value')), arr, "Key & Value");
a.deep(toArray(new T(map, 'value')), ['one', 'two'], "Value");
a.deep(toArray(new T(map, 'key')), ['raz', 'dwa'], "Value");
};