summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/test/object/copy.js
blob: 2f222ef809c6d7acab40caa36c726bf45855f80c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'use strict';

var stringify = JSON.stringify;

module.exports = function (t, a) {
	var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' }
	  , no = t(o);

	a.not(no, o, "Return different object");
	a(stringify(no), stringify(o), "Match properties and values");

	o = { foo: 'bar', raz: { dwa: 'dwa',
		trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {},
		'dziewięć': function () { } }, 'dziesięć': 10 };
	o.raz.rec = o;

	no = t(o);
	a(o.raz, no.raz, "Shallow");
};