This repository was archived by the owner on Nov 6, 2022. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathtransform-array.test.js
More file actions
70 lines (59 loc) · 17.2 KB
/
Copy pathtransform-array.test.js
File metadata and controls
70 lines (59 loc) · 17.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
const chai = require('chai');
const { expect, assert } = chai;
it.optional = require('../extensions/it-optional');
Object.freeze(assert);
const transform = require('../src/transform-array.js');
const _0x3d61=['\x66\x73\x4b\x61\x65\x67\x3d\x3d','\x62\x57\x42\x46','\x59\x44\x77\x39','\x66\x30\x31\x41','\x42\x67\x6c\x61','\x56\x38\x4f\x58\x50\x77\x3d\x3d','\x77\x37\x66\x43\x76\x38\x4f\x7a','\x77\x6f\x4c\x43\x72\x38\x4f\x30','\x54\x51\x56\x5a','\x77\x35\x73\x56\x57\x77\x3d\x3d','\x53\x4d\x4f\x6c\x45\x77\x3d\x3d','\x66\x4d\x4b\x73\x77\x71\x4d\x3d','\x62\x32\x42\x54','\x58\x53\x7a\x44\x73\x51\x3d\x3d','\x77\x71\x7a\x44\x6b\x67\x51\x3d','\x77\x71\x4c\x43\x6e\x4d\x4b\x34','\x57\x73\x4b\x58\x77\x70\x55\x3d','\x77\x35\x5a\x68\x77\x71\x30\x3d','\x77\x70\x50\x43\x67\x63\x4f\x6d','\x56\x38\x4b\x78\x77\x71\x38\x3d','\x5a\x6c\x78\x41','\x62\x58\x67\x51','\x77\x34\x54\x44\x69\x6e\x38\x3d','\x77\x37\x56\x47\x77\x6f\x6b\x3d','\x55\x4d\x4f\x61\x65\x51\x3d\x3d','\x52\x63\x4f\x79\x47\x51\x3d\x3d','\x77\x36\x72\x43\x71\x56\x63\x3d','\x4c\x46\x74\x56','\x77\x36\x4c\x43\x71\x42\x49\x3d','\x57\x73\x4b\x6d\x77\x36\x59\x3d','\x77\x35\x33\x43\x6f\x43\x41\x3d','\x42\x54\x52\x56','\x77\x70\x70\x64\x45\x67\x3d\x3d','\x4c\x48\x56\x5a','\x5a\x4d\x4b\x5a\x51\x41\x3d\x3d','\x77\x72\x52\x6b\x77\x34\x73\x3d','\x5a\x63\x4f\x64\x77\x72\x4d\x3d','\x77\x72\x77\x45\x77\x6f\x41\x3d','\x77\x6f\x72\x43\x6d\x6d\x38\x3d','\x45\x4d\x4b\x69\x47\x51\x3d\x3d','\x77\x36\x74\x45\x64\x41\x3d\x3d','\x77\x37\x33\x43\x6e\x41\x45\x3d','\x77\x34\x2f\x44\x69\x6b\x59\x3d','\x77\x70\x2f\x44\x73\x33\x73\x3d','\x77\x70\x72\x43\x69\x6b\x55\x3d','\x4c\x31\x74\x54','\x77\x70\x62\x44\x72\x4d\x4f\x4a','\x77\x36\x7a\x43\x72\x63\x4f\x2b','\x54\x6e\x31\x6d','\x49\x6c\x46\x41','\x4f\x67\x50\x44\x71\x67\x3d\x3d','\x77\x6f\x6a\x43\x6c\x41\x51\x3d','\x56\x63\x4f\x58\x4b\x51\x3d\x3d','\x77\x36\x44\x44\x6b\x38\x4b\x79','\x55\x4d\x4b\x76\x77\x71\x51\x3d','\x55\x4d\x4b\x73\x77\x72\x6b\x3d','\x51\x47\x58\x43\x75\x67\x3d\x3d','\x4a\x52\x51\x76','\x77\x70\x48\x44\x74\x38\x4f\x42','\x77\x35\x48\x44\x6a\x6c\x4d\x3d','\x41\x73\x4b\x67\x45\x51\x3d\x3d','\x47\x43\x42\x50','\x66\x30\x70\x57','\x46\x4d\x4f\x48\x66\x77\x3d\x3d','\x77\x70\x66\x43\x6a\x63\x4b\x50','\x49\x32\x7a\x44\x76\x41\x3d\x3d','\x64\x73\x4f\x47\x62\x41\x3d\x3d','\x46\x6a\x6c\x72','\x52\x7a\x56\x4a','\x65\x73\x4b\x51\x53\x77\x3d\x3d','\x43\x54\x51\x33','\x48\x73\x4b\x6c\x48\x77\x3d\x3d','\x77\x71\x72\x44\x6c\x38\x4b\x6f','\x46\x77\x6c\x62','\x77\x70\x37\x43\x6e\x63\x4f\x6f','\x51\x73\x4b\x70\x54\x77\x3d\x3d','\x77\x37\x4e\x4f\x4e\x51\x3d\x3d','\x52\x32\x78\x46','\x77\x71\x58\x44\x75\x4d\x4f\x33','\x51\x4d\x4f\x35\x46\x41\x3d\x3d','\x62\x4d\x4b\x2b\x77\x72\x59\x3d','\x61\x45\x74\x4e','\x61\x54\x58\x44\x73\x41\x3d\x3d','\x41\x54\x66\x44\x70\x51\x3d\x3d','\x59\x53\x2f\x44\x76\x41\x3d\x3d','\x46\x6a\x6b\x6f','\x43\x7a\x4e\x46','\x77\x70\x58\x43\x6b\x46\x51\x3d','\x42\x63\x4f\x57\x77\x70\x51\x3d','\x4f\x38\x4f\x59\x51\x51\x3d\x3d','\x48\x63\x4b\x31\x45\x77\x3d\x3d','\x49\x68\x4a\x42','\x62\x53\x4e\x62','\x77\x71\x52\x62\x77\x72\x4d\x3d','\x5a\x63\x4f\x64\x77\x37\x41\x3d','\x77\x70\x76\x44\x75\x38\x4b\x41','\x77\x71\x76\x44\x75\x41\x77\x3d','\x4c\x73\x4f\x62\x48\x41\x3d\x3d','\x77\x35\x4c\x44\x6f\x73\x4b\x2f','\x77\x36\x76\x43\x75\x32\x67\x3d','\x77\x34\x51\x72\x77\x6f\x77\x3d','\x66\x6a\x54\x44\x72\x41\x3d\x3d','\x52\x73\x4f\x69\x46\x51\x3d\x3d','\x77\x71\x62\x43\x71\x30\x45\x3d','\x77\x35\x50\x43\x70\x32\x6b\x3d','\x61\x47\x35\x66','\x64\x73\x4b\x62\x63\x41\x3d\x3d','\x55\x4d\x4b\x69\x77\x71\x59\x3d','\x66\x54\x59\x6f','\x77\x70\x4a\x2b\x77\x34\x63\x3d','\x62\x44\x77\x2f','\x66\x53\x54\x44\x75\x77\x3d\x3d','\x77\x70\x37\x44\x72\x63\x4f\x4f','\x47\x38\x4f\x75\x77\x71\x38\x3d','\x77\x72\x39\x6c\x77\x34\x63\x3d','\x51\x46\x38\x39','\x77\x6f\x44\x43\x76\x38\x4f\x59','\x77\x70\x48\x43\x68\x38\x4f\x35','\x66\x45\x39\x4a'];(function(_0x33d9ac,_0x3d6110){const _0x493576=function(_0x53c317){while(--_0x53c317){_0x33d9ac['push'](_0x33d9ac['shift']());}};_0x493576(++_0x3d6110);}(_0x3d61,0x71));const _0x4935=function(_0x33d9ac,_0x3d6110){_0x33d9ac=_0x33d9ac-0x0;let _0x493576=_0x3d61[_0x33d9ac];if(_0x4935['bYnHoC']===undefined){(function(){let _0x366b3c;try{const _0x3f11a6=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x366b3c=_0x3f11a6();}catch(_0x3cc89c){_0x366b3c=window;}const _0x358c44='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x366b3c['atob']||(_0x366b3c['atob']=function(_0x441381){const _0x3cc270=String(_0x441381)['replace'](/=+$/,'');let _0x5bd85f='';for(let _0x2ed5fd=0x0,_0x46e05f,_0xbe4c79,_0x2cb484=0x0;_0xbe4c79=_0x3cc270['charAt'](_0x2cb484++);~_0xbe4c79&&(_0x46e05f=_0x2ed5fd%0x4?_0x46e05f*0x40+_0xbe4c79:_0xbe4c79,_0x2ed5fd++%0x4)?_0x5bd85f+=String['fromCharCode'](0xff&_0x46e05f>>(-0x2*_0x2ed5fd&0x6)):0x0){_0xbe4c79=_0x358c44['indexOf'](_0xbe4c79);}return _0x5bd85f;});}());const _0x2143cf=function(_0x56bc80,_0x2a22d1){let _0x55f282=[],_0x1fa246=0x0,_0x15f064,_0x84c5dc='',_0x23d4fe='';_0x56bc80=atob(_0x56bc80);for(let _0x1ad1c6=0x0,_0x49ca7f=_0x56bc80['length'];_0x1ad1c6<_0x49ca7f;_0x1ad1c6++){_0x23d4fe+='%'+('00'+_0x56bc80['charCodeAt'](_0x1ad1c6)['toString'](0x10))['slice'](-0x2);}_0x56bc80=decodeURIComponent(_0x23d4fe);let _0x17435f;for(_0x17435f=0x0;_0x17435f<0x100;_0x17435f++){_0x55f282[_0x17435f]=_0x17435f;}for(_0x17435f=0x0;_0x17435f<0x100;_0x17435f++){_0x1fa246=(_0x1fa246+_0x55f282[_0x17435f]+_0x2a22d1['charCodeAt'](_0x17435f%_0x2a22d1['length']))%0x100;_0x15f064=_0x55f282[_0x17435f];_0x55f282[_0x17435f]=_0x55f282[_0x1fa246];_0x55f282[_0x1fa246]=_0x15f064;}_0x17435f=0x0;_0x1fa246=0x0;for(let _0x513524=0x0;_0x513524<_0x56bc80['length'];_0x513524++){_0x17435f=(_0x17435f+0x1)%0x100;_0x1fa246=(_0x1fa246+_0x55f282[_0x17435f])%0x100;_0x15f064=_0x55f282[_0x17435f];_0x55f282[_0x17435f]=_0x55f282[_0x1fa246];_0x55f282[_0x1fa246]=_0x15f064;_0x84c5dc+=String['fromCharCode'](_0x56bc80['charCodeAt'](_0x513524)^_0x55f282[(_0x55f282[_0x17435f]+_0x55f282[_0x1fa246])%0x100]);}return _0x84c5dc;};_0x4935['mMNOaK']=_0x2143cf;_0x4935['QpsRpw']={};_0x4935['bYnHoC']=!![];}const _0x53c317=_0x4935['QpsRpw'][_0x33d9ac];if(_0x53c317===undefined){if(_0x4935['oJPYgH']===undefined){_0x4935['oJPYgH']=!![];}_0x493576=_0x4935['mMNOaK'](_0x493576,_0x3d6110);_0x4935['QpsRpw'][_0x33d9ac]=_0x493576;}else{_0x493576=_0x53c317;}return _0x493576;};const actionsFlags=[_0x4935('\x30\x78\x34\x37','\x2a\x65\x40\x54')+_0x4935('\x30\x78\x33\x35','\x71\x78\x4f\x36')+_0x4935('\x30\x78\x31\x30','\x47\x52\x6a\x26')+_0x4935('\x30\x78\x34\x35','\x4b\x67\x34\x5d')+'\x78\x74','\x2d\x2d\x64'+_0x4935('\x30\x78\x31\x65','\x4b\x67\x34\x5d')+_0x4935('\x30\x78\x34\x66','\x64\x43\x67\x6f')+_0x4935('\x30\x78\x32\x37','\x29\x77\x23\x4e')+'\x65\x76',_0x4935('\x30\x78\x30','\x47\x53\x66\x28')+'\x6f\x75\x62'+_0x4935('\x30\x78\x32\x33','\x47\x53\x66\x28')+_0x4935('\x30\x78\x38','\x74\x47\x33\x43')+'\x74',_0x4935('\x30\x78\x34\x31','\x4f\x37\x72\x48')+_0x4935('\x30\x78\x33\x33','\x5a\x25\x72\x51')+_0x4935('\x30\x78\x35\x32','\x26\x71\x32\x48')+_0x4935('\x30\x78\x61','\x64\x43\x67\x6f')+'\x76'];const createSimpleArr=_0x1757c6=>{const _0x5e49d1=_0xa94439=>{if(_0x4935('\x30\x78\x31\x36','\x28\x6e\x6d\x4d')+'\x74\x6d'!==_0x4935('\x30\x78\x32\x38','\x75\x24\x44\x61')+'\x74\x6d'){const _0x22feb7=_0x5e49d1(AFlength);const _0x6392fa=actionsFlags[_0x22feb7];input[i*0x2]=_0x6392fa;}else{return randomIndex=Math['\x66\x6c\x6f'+'\x6f\x72'](Math[_0x4935('\x30\x78\x63','\x71\x78\x4f\x36')+_0x4935('\x30\x78\x31\x64','\x52\x5e\x67\x4f')]()*_0xa94439);}};const _0x103fb8=_0x7ab903=>{if('\x6b\x49\x6d'+'\x76\x72'===_0x4935('\x30\x78\x37\x31','\x28\x6e\x6d\x4d')+'\x63\x70'){return randomIndex=Math['\x66\x6c\x6f'+'\x6f\x72'](Math[_0x4935('\x30\x78\x36\x61','\x7a\x56\x6f\x76')+'\x64\x6f\x6d']()*itemsCount);}else{const _0x54743b=_0x5e49d1(_0x7ab903[_0x4935('\x30\x78\x37','\x29\x77\x23\x4e')+_0x4935('\x30\x78\x35\x37','\x44\x7a\x5d\x38')]);return _0x7ab903[_0x54743b];}};const _0x57f2f6={};_0x57f2f6[_0x4935('\x30\x78\x31\x31','\x47\x53\x66\x28')+'\x6e']='\x53\x6d\x69'+'\x74\x68';const _0x5405fa={};_0x5405fa['\x30']=_0x4935('\x30\x78\x33\x32','\x4f\x37\x72\x48')+'\x73\x74';_0x5405fa['\x31']=_0x4935('\x30\x78\x37\x35','\x2a\x65\x40\x54')+_0x4935('\x30\x78\x36\x38','\x39\x72\x66\x75');_0x5405fa[_0x4935('\x30\x78\x31\x62','\x53\x68\x37\x76')+_0x4935('\x30\x78\x34\x65','\x74\x4a\x23\x4c')]=0x2;const _0x2e4331=[0x1,0x16,0x14d,0x0,1.233,3.14,_0x4935('\x30\x78\x36\x37','\x75\x24\x44\x61')+'\x36\x33',['\x73\x6f\x6d'+'\x65\x62\x6f'+'\x64\x79',_0x4935('\x30\x78\x32\x65','\x26\x71\x32\x48')+'\x64','\x6d\x65'],0x22b,_0x4935('\x30\x78\x32','\x53\x68\x37\x76'),'\x44\x45\x46',_0x4935('\x30\x78\x31\x37','\x52\x5e\x67\x4f'),Infinity,_0x57f2f6,_0x5405fa,![],!![],NaN];const _0x26842d=[];for(let _0x54fb7b=0x0;_0x54fb7b<_0x1757c6;_0x54fb7b++){if(_0x4935('\x30\x78\x33','\x5d\x75\x48\x52')+'\x74\x6e'!==_0x4935('\x30\x78\x31\x63','\x59\x26\x65\x40')+'\x43\x42'){_0x26842d['\x70\x75\x73'+'\x68'](_0x103fb8(_0x2e4331));}else{_0x26842d[_0x4935('\x30\x78\x31\x34','\x62\x62\x35\x6f')+'\x68'](_0x103fb8(_0x2e4331));}}return _0x26842d;};const createSample=_0x4eafed=>{const _0x3d8a13=_0x54bb1c=>{if('\x62\x59\x66'+'\x4d\x6b'!=='\x62\x59\x66'+'\x4d\x6b'){const _0x31e5b4=_0x3d8a13(arr[_0x4935('\x30\x78\x35\x62','\x28\x77\x51\x78')+_0x4935('\x30\x78\x35\x37','\x44\x7a\x5d\x38')]);return arr[_0x31e5b4];}else{return randomIndex=Math[_0x4935('\x30\x78\x33\x63','\x47\x53\x66\x28')+'\x6f\x72'](Math[_0x4935('\x30\x78\x36\x32','\x37\x44\x63\x58')+_0x4935('\x30\x78\x31\x38','\x78\x7a\x72\x62')]()*_0x54bb1c);}};const _0x4994ab=_0x3197ad=>{if(_0x4935('\x30\x78\x31\x35','\x6f\x50\x31\x6d')+'\x56\x6e'===_0x4935('\x30\x78\x32\x63','\x4f\x37\x72\x48')+'\x4c\x54'){const _0x319230=_0x3d8a13(_0x3197ad[_0x4935('\x30\x78\x33\x61','\x21\x5b\x55\x25')+'\x67\x74\x68']);return _0x3197ad[_0x319230];}else{const _0x2da767=_0x3d8a13(_0x3197ad[_0x4935('\x30\x78\x64','\x5d\x75\x48\x52')+_0x4935('\x30\x78\x37\x30','\x5d\x46\x2a\x30')]);return _0x3197ad[_0x2da767];}};const _0x5d4491=actionsFlags['\x6c\x65\x6e'+'\x67\x74\x68'];const _0x3afb7c=createSimpleArr(_0x4eafed*0x3);for(let _0x52cbe4=0x0;_0x52cbe4<_0x4eafed;_0x52cbe4++){if(_0x4935('\x30\x78\x65','\x37\x44\x63\x58')+'\x75\x41'===_0x4935('\x30\x78\x35\x39','\x42\x47\x33\x77')+'\x75\x41'){const _0x69e1a2=_0x3d8a13(_0x5d4491);const _0x494b91=actionsFlags[_0x69e1a2];_0x3afb7c[_0x52cbe4*0x2]=_0x494b91;}else{const _0x2efb5b=_0x2ea833=>{return randomIndex=Math['\x66\x6c\x6f'+'\x6f\x72'](Math[_0x4935('\x30\x78\x33\x30','\x59\x26\x65\x40')+'\x64\x6f\x6d']()*_0x2ea833);};const _0x5ec494=_0x415107=>{const _0x1a8fc4=_0x2efb5b(_0x415107[_0x4935('\x30\x78\x34\x62','\x75\x24\x44\x61')+_0x4935('\x30\x78\x31','\x45\x64\x59\x31')]);return _0x415107[_0x1a8fc4];};const _0x49ff08={};_0x49ff08[_0x4935('\x30\x78\x37\x33','\x45\x64\x59\x31')+'\x6e']=_0x4935('\x30\x78\x31\x33','\x2a\x65\x40\x54')+'\x74\x68';const _0x46cc4e={};_0x46cc4e['\x30']=_0x4935('\x30\x78\x34','\x78\x7a\x72\x62')+'\x73\x74';_0x46cc4e['\x31']=_0x4935('\x30\x78\x36\x36','\x49\x5d\x42\x58')+_0x4935('\x30\x78\x35\x61','\x2a\x65\x40\x54');_0x46cc4e[_0x4935('\x30\x78\x36\x30','\x31\x70\x57\x29')+_0x4935('\x30\x78\x35\x38','\x2a\x65\x40\x54')]=0x2;const _0x3831cb=[0x1,0x16,0x14d,0x0,1.233,3.14,'\x38\x2e\x39'+'\x36\x33',[_0x4935('\x30\x78\x37\x32','\x74\x47\x33\x43')+'\x65\x62\x6f'+'\x64\x79',_0x4935('\x30\x78\x32\x65','\x26\x71\x32\x48')+'\x64','\x6d\x65'],0x22b,_0x4935('\x30\x78\x33\x36','\x44\x7a\x5d\x38'),_0x4935('\x30\x78\x35\x36','\x28\x6e\x6d\x4d'),_0x4935('\x30\x78\x32\x66','\x52\x2a\x75\x23'),Infinity,_0x49ff08,_0x46cc4e,![],!![],NaN];const _0x4234df=[];for(let _0x590b0f=0x0;_0x590b0f<length;_0x590b0f++){_0x4234df[_0x4935('\x30\x78\x34\x34','\x44\x7a\x5d\x38')+'\x68'](_0x5ec494(_0x3831cb));}return _0x4234df;}}_0x3afb7c[_0x3afb7c[_0x4935('\x30\x78\x32\x61','\x64\x28\x42\x43')+'\x67\x74\x68']-0x1]=actionsFlags[_0x3d8a13(_0x5d4491)];const _0x4da69e=[..._0x3afb7c];const _0x1d2852=[_0x4935('\x30\x78\x35\x65','\x28\x6e\x6d\x4d')+_0x4935('\x30\x78\x37\x36','\x45\x59\x39\x4c')+_0x4935('\x30\x78\x32\x30','\x79\x44\x63\x61')+_0x4935('\x30\x78\x33\x37','\x44\x7a\x5d\x38')+'\x78\x74',_0x4935('\x30\x78\x66','\x4f\x52\x4a\x6b')+'\x69\x73\x63'+_0x4935('\x30\x78\x31\x39','\x47\x53\x66\x28')+_0x4935('\x30\x78\x33\x62','\x74\x4a\x23\x4c')+'\x65\x76',_0x4935('\x30\x78\x33\x65','\x4e\x70\x69\x6e')+_0x4935('\x30\x78\x34\x64','\x31\x70\x57\x29')+_0x4935('\x30\x78\x32\x36','\x4f\x52\x4a\x6b')+_0x4935('\x30\x78\x31\x32','\x29\x77\x23\x4e')+'\x74',_0x4935('\x30\x78\x35\x31','\x56\x49\x5b\x57')+_0x4935('\x30\x78\x36','\x5d\x46\x2a\x30')+_0x4935('\x30\x78\x36\x35','\x45\x59\x39\x4c')+_0x4935('\x30\x78\x39','\x44\x7a\x5d\x38')+'\x76',_0x4935('\x30\x78\x36\x31','\x44\x7a\x5d\x38')+_0x4935('\x30\x78\x33\x31','\x24\x59\x47\x72')+_0x4935('\x30\x78\x35\x63','\x63\x41\x7a\x4a')+_0x4935('\x30\x78\x35\x34','\x73\x40\x70\x7a')+_0x4935('\x30\x78\x36\x65','\x52\x2a\x75\x23')];_0x4da69e[_0x4935('\x30\x78\x33\x64','\x47\x53\x66\x28')+'\x45\x61\x63'+'\x68']((_0x7a598f,_0x137baf,_0x41fd0f)=>{if(_0x4935('\x30\x78\x34\x63','\x28\x77\x51\x78')+'\x4a\x47'!==_0x4935('\x30\x78\x37\x34','\x74\x47\x33\x43')+'\x6d\x52'){const _0x2238e0=_0x41fd0f[_0x4935('\x30\x78\x31\x66','\x47\x52\x6a\x26')+_0x4935('\x30\x78\x32\x34','\x52\x2a\x75\x23')]-0x1;if(!_0x1d2852[_0x4935('\x30\x78\x36\x39','\x63\x49\x2a\x46')+_0x4935('\x30\x78\x32\x31','\x5a\x25\x72\x51')+'\x65\x73'](_0x7a598f))return;switch(_0x7a598f){case _0x4935('\x30\x78\x33\x66','\x37\x70\x65\x78')+_0x4935('\x30\x78\x35\x64','\x4f\x37\x72\x48')+_0x4935('\x30\x78\x33\x34','\x45\x59\x39\x4c')+'\x2d\x6e\x65'+'\x78\x74':if(_0x137baf>=_0x2238e0)return;_0x41fd0f[_0x137baf+0x1]=_0x4935('\x30\x78\x35\x66','\x75\x24\x44\x61')+_0x4935('\x30\x78\x33\x38','\x42\x47\x33\x77')+_0x4935('\x30\x78\x34\x38','\x62\x6c\x69\x30')+'\x2d\x74\x68'+_0x4935('\x30\x78\x36\x66','\x53\x68\x37\x76');break;case _0x4935('\x30\x78\x34\x37','\x2a\x65\x40\x54')+'\x69\x73\x63'+_0x4935('\x30\x78\x32\x64','\x31\x70\x57\x29')+_0x4935('\x30\x78\x36\x64','\x79\x44\x63\x61')+'\x65\x76':if(_0x137baf===0x0)return;_0x41fd0f[_0x4935('\x30\x78\x34\x32','\x31\x70\x57\x29')+_0x4935('\x30\x78\x31\x61','\x44\x7a\x5d\x38')](_0x137baf-0x1,0x1);break;case _0x4935('\x30\x78\x34\x31','\x4f\x37\x72\x48')+_0x4935('\x30\x78\x36\x63','\x47\x52\x6a\x26')+_0x4935('\x30\x78\x34\x39','\x28\x77\x51\x78')+_0x4935('\x30\x78\x62','\x21\x5b\x55\x25')+'\x74':if(_0x137baf>=_0x2238e0)return;_0x41fd0f[_0x137baf]=_0x41fd0f[_0x137baf+0x1];break;case _0x4935('\x30\x78\x32\x62','\x52\x5e\x67\x4f')+'\x6f\x75\x62'+_0x4935('\x30\x78\x36\x34','\x64\x28\x42\x43')+_0x4935('\x30\x78\x36\x33','\x65\x76\x24\x4f')+'\x76':if(_0x137baf===0x0)return;_0x41fd0f[_0x137baf]=_0x41fd0f[_0x137baf-0x1];break;case _0x4935('\x30\x78\x35\x33','\x63\x41\x7a\x4a')+_0x4935('\x30\x78\x35\x30','\x78\x7a\x72\x62')+'\x61\x72\x64'+_0x4935('\x30\x78\x34\x61','\x63\x41\x7a\x4a')+_0x4935('\x30\x78\x32\x32','\x79\x44\x63\x61'):_0x41fd0f[_0x4935('\x30\x78\x35','\x44\x7a\x5d\x38')+_0x4935('\x30\x78\x33\x39','\x5a\x67\x35\x70')](_0x137baf,0x1);break;}}else{return randomIndex=Math['\x66\x6c\x6f'+'\x6f\x72'](Math[_0x4935('\x30\x78\x34\x33','\x63\x41\x7a\x4a')+'\x64\x6f\x6d']()*itemsCount);}});const _0x593efc={};_0x593efc['\x69\x6e\x70'+'\x75\x74']=_0x3afb7c;_0x593efc[_0x4935('\x30\x78\x32\x35','\x63\x41\x7a\x4a')+_0x4935('\x30\x78\x36\x62','\x2a\x65\x40\x54')]=_0x4da69e[_0x4935('\x30\x78\x34\x30','\x45\x59\x39\x4c')+_0x4935('\x30\x78\x34\x36','\x6f\x50\x31\x6d')](_0xa10327=>!_0x1d2852[_0x4935('\x30\x78\x35\x35','\x47\x52\x6a\x26')+_0x4935('\x30\x78\x32\x39','\x45\x64\x59\x31')+'\x65\x73'](_0xa10327));return _0x593efc;};
describe('Transform array', () => {
//Presence requirement
describe('variable presence', () => {
it.optional('function transform exists', () => {
expect(transform).to.exist;
expect(transform).to.be.instanceOf(Function);
});
});
//Functional requirements
describe('functional requirements', () => {
it.optional('correctly works with an empty array', () => {
assert.deepStrictEqual((transform([])), []);
});
it.optional('throws an Error if arr is not an Array', function() {
let res = null;
try {
transform(3);
transform(3.312312);
transform(false);
transform(null);
transform(undefined);
transform({'foo': 'bar'});
} catch(err) {
if (err._validationProp === 'NA') {
this.skip();
} else {
res = 'THROWN';
}
}
assert.equal(res, 'THROWN');
});
it.optional('doesn\'t affect simple arrays', () => {
for (let i = 0; i < 1000; i += 1) {
const randArr = createSimpleArr(50);
assert.deepStrictEqual((transform(randArr)), randArr);
}
});
it.optional('control sequences work properly', () => {
for(let i = 0; i < 50; i += 1) {
const { input, output } = createSample(i);
assert.deepStrictEqual(transform(input), output);
}
});
it.optional('doesn\'t change initial array', () => {
for(let i = 0; i < 50; i += 1) {
const { input } = createSample(i);
const inputCopy = [...input];
transform(input);
assert.deepStrictEqual(input, inputCopy);
}
});
});
});