]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/array/#/concat/shim.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / node-gyp / node_modules / path-array / node_modules / array-index / node_modules / es6-symbol / node_modules / es5-ext / test / array / # / concat / shim.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/array/#/concat/shim.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/array/#/concat/shim.js
new file mode 100644 (file)
index 0000000..c30eb7e
--- /dev/null
@@ -0,0 +1,26 @@
+'use strict';
+
+var SubArray = require('../../../../array/_sub-array-dummy-safe');
+
+module.exports = function (t, a) {
+       var arr = [1, 3, 45], x = {}, subArr, subArr2, result;
+
+       a.deep(t.call(arr, '2d', x, ['ere', 'fe', x], false, null),
+               [1, 3, 45, '2d', x, 'ere', 'fe', x, false, null], "Plain array");
+
+       subArr = new SubArray('lol', 'miszko');
+       subArr2 = new SubArray('elo', 'fol');
+
+       result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
+       a(result instanceof SubArray, true, "Instance of subclass");
+       a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', 'elo', 'fol', null],
+               "Spreable by default");
+
+       SubArray.prototype['@@isConcatSpreadable'] = false;
+
+       result = t.call(subArr, 'df', arr, 'fef', subArr2, null);
+       a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', subArr2, null],
+               "Non spreadable");
+
+       delete SubArray.prototype['@@isConcatSpreadable'];
+};