Sha256: a2d6c95bde911ad02dd503edf145d567b000b130457f10c4439bb93b778f8c9c

Contents?: true

Size: 1.18 KB

Versions: 17

Compression:

Stored size: 1.18 KB

Contents

'use strict';

var ArrayIterator = require('../array')

  , slice = Array.prototype.slice;

module.exports = function (t, a) {
	var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}, called = 0;
	t(x, function () {
		a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
		a(this, y, "Array: context:  " + (i++) + "#");
	}, y);
	i = 0;
	t((function () { return arguments; }('raz', 'dwa', 'trzy')), function () {
		a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#");
		a(this, y, "Arguments: context:  " + (i++) + "#");
	}, y);
	i = 0;
	t(x = 'foo', function () {
		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
		a(this, y, "Regular String: context:  " + (i++) + "#");
	}, y);
	i = 0;
	x = ['r', '💩', 'z'];
	t('r💩z', function () {
		a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
		a(this, y, "Unicode String: context:  " + (i++) + "#");
	}, y);
	i = 0;
	t(new ArrayIterator(x), function () {
		a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
		a(this, y, "Iterator: context:  " + (i++) + "#");
	}, y);

	t(x = ['raz', 'dwa', 'trzy'], function (value, doBreak) {
		++called;
		return doBreak();
	});
	a(called, 1, "Break");
};

Version data entries

17 entries across 12 versions & 6 rubygems

Version Path
guard-sass-lint-0.1.2 node_modules/es6-iterator/test/for-of.js
guard-sass-lint-0.1.1 node_modules/es6-iterator/test/for-of.js
lanes-0.8.0 node_modules/es6-iterator/test/for-of.js
node-compiler-0.9.1 vendor/node/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
node-compiler-0.9.0 vendor/node-v7.2.1/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
node-compiler-0.8.0 vendor/node-v7.2.0/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/es6-iterator/test/for-of.js
node-compiler-0.7.0 vendor/node-v7.1.0/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
node-compiler-0.7.0 vendor/node-v6.9.1/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/es6-iterator/test/for-of.js
blackboard-3.1.9 lib/site_template/node_modules/es6-iterator/test/for-of.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/node_modules/es6-iterator/test/for-of.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/escope/node_modules/es6-map/node_modules/es6-set/node_modules/es6-iterator/test/for-of.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/node_modules/es6-iterator/test/for-of.js