From 53def7ba24db6563b44d85418e98dbaec020d0f5 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Sun, 3 Apr 2016 16:19:38 +0300 Subject: [PATCH 01/23] async task --- extensions/it-optional.js | 2 +- task/07-yield-tasks.js | 16 +++++++++++++++- test/07-yield-tests.js | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/extensions/it-optional.js b/extensions/it-optional.js index 380b80918..65b17d2a3 100644 --- a/extensions/it-optional.js +++ b/extensions/it-optional.js @@ -6,7 +6,7 @@ function testOptional(title, fn) { it(title, function() { try { - fn.call(this); + return fn.call(this); } catch (err) { if (err.message=="Not implemented") { this.test.skip(); diff --git a/task/07-yield-tasks.js b/task/07-yield-tasks.js index a2369790a..bf0ac2c2d 100644 --- a/task/07-yield-tasks.js +++ b/task/07-yield-tasks.js @@ -129,11 +129,25 @@ function* mergeSortedSequences(source1, source2) { throw new Error('Not implemented'); } +/** + * Resolve Promises and take values step by step. + * + * @params {Iterable.} generator + * @return {Promise} Promise with value returned via return + * + * @example + * async((function*() { var a = yield Promise.resolve(6); return a; }) => 6 + */ +function async(generator) { + throw new Error('Not implemented'); +} + module.exports = { get99BottlesOfBeer: get99BottlesOfBeer, getFibonacciSequence: getFibonacciSequence, depthTraversalTree: depthTraversalTree, breadthTraversalTree: breadthTraversalTree, - mergeSortedSequences: mergeSortedSequences + mergeSortedSequences: mergeSortedSequences, + async : async }; diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index a38c53e3d..376c4323b 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -446,4 +446,43 @@ describe('07-yield-tasks', function() { assert.equal(count, ITEMS_COUNT); }); + + it.optional('async should resolve Promises and take values step by step', () => { + return new Promise((resolve, reject)=> { + tasks.async(function*() { + let a = yield new Promise((resolve)=> setTimeout(()=>resolve(5), 100)), + b = yield Promise.resolve(6); + assert.equal(a, 5, ''); + assert.equal(b, 6, ''); + + return yield new Promise((resolve)=> resolve(a + b)); + }).then(value=> { + try { + assert.equal(value, 11, ''); + resolve() + } catch (err) { + reject(err); + } + }, (err)=> { + reject(err); + }); + }); + }); + + it.optional('async should handle exception during generator work', () => { + return new Promise((resolve, reject)=> { + tasks.async(function*() { + yield new Promise(()=> {throw new Error("test error");}); + }).then(()=> { + reject(); + }, (err)=> { + try { + assert.equal(err.message, 'test error', ''); + resolve() + } catch (err) { + reject(err); + } + }); + }); + }); }); From 702d9b5ab3eee56e308599f32b291ed4945015a6 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Sun, 3 Apr 2016 16:27:42 +0300 Subject: [PATCH 02/23] async task description --- task/07-yield-tasks.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/task/07-yield-tasks.js b/task/07-yield-tasks.js index bf0ac2c2d..2c7422ee7 100644 --- a/task/07-yield-tasks.js +++ b/task/07-yield-tasks.js @@ -136,7 +136,11 @@ function* mergeSortedSequences(source1, source2) { * @return {Promise} Promise with value returned via return * * @example - * async((function*() { var a = yield Promise.resolve(6); return a; }) => 6 + * async((function*() { + * var a = yield new Promise((resolve)=> setTimeout(()=>resolve(5))); + * var b = yield Promise.resolve(6); + * return a + b; + * }).then(value=>console.log(value)) => 11 */ function async(generator) { throw new Error('Not implemented'); From c47a9b604e2474a1431c67a6310d521a1c693c83 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Sun, 3 Apr 2016 16:44:55 +0300 Subject: [PATCH 03/23] async task, tests fixes --- extensions/it-optional.js | 19 +++++++++++++------ test/07-yield-tests.js | 14 +++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/extensions/it-optional.js b/extensions/it-optional.js index 65b17d2a3..0af4d7756 100644 --- a/extensions/it-optional.js +++ b/extensions/it-optional.js @@ -3,16 +3,23 @@ exports = module.exports = testOptional; function testOptional(title, fn) { - - it(title, function() { - try { - return fn.call(this); - } catch (err) { - if (err.message=="Not implemented") { + + it(title, function () { + let errHandler = (err) => { + if (err.message == "Not implemented") { this.test.skip(); } else { throw err; } + }; + + try { + let promise = fn.call(this); + if (promise && promise.catch) { + return promise.catch(errHandler); + } + } catch (err) { + errHandler(err); } }); diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index 376c4323b..e22d92638 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -452,13 +452,13 @@ describe('07-yield-tasks', function() { tasks.async(function*() { let a = yield new Promise((resolve)=> setTimeout(()=>resolve(5), 100)), b = yield Promise.resolve(6); - assert.equal(a, 5, ''); - assert.equal(b, 6, ''); + assert.equal(a, 5); + assert.equal(b, 6); return yield new Promise((resolve)=> resolve(a + b)); }).then(value=> { try { - assert.equal(value, 11, ''); + assert.equal(value, 11); resolve() } catch (err) { reject(err); @@ -476,12 +476,8 @@ describe('07-yield-tasks', function() { }).then(()=> { reject(); }, (err)=> { - try { - assert.equal(err.message, 'test error', ''); - resolve() - } catch (err) { - reject(err); - } + if (err.message === 'test error') resolve(); + else reject(err); }); }); }); From 6ea58583b3db95c3f3452d8ba325d7c0c9efe995 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Tue, 12 Sep 2017 23:52:02 +0300 Subject: [PATCH 04/23] added a comment for async task --- task/07-yield-tasks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/task/07-yield-tasks.js b/task/07-yield-tasks.js index 2c7422ee7..9e88bf9b7 100644 --- a/task/07-yield-tasks.js +++ b/task/07-yield-tasks.js @@ -141,6 +141,8 @@ function* mergeSortedSequences(source1, source2) { * var b = yield Promise.resolve(6); * return a + b; * }).then(value=>console.log(value)) => 11 + * + * Most popular implementation of the logic in npm https://www.npmjs.com/package/co */ function async(generator) { throw new Error('Not implemented'); From dbb7799c8cc027eeea931e5727e6d574ab183188 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Thu, 14 Sep 2017 15:32:58 +0300 Subject: [PATCH 05/23] new timeSpanToString test --- test/03-date-tests.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/03-date-tests.js b/test/03-date-tests.js index 328e57b48..94894e12f 100644 --- a/test/03-date-tests.js +++ b/test/03-date-tests.js @@ -83,6 +83,10 @@ describe('03-date-tasks', function() { startDate: new Date(2000,1,1,10,0,0), endDate: new Date(2000,1,1,15,20,10,453), expected: '05:20:10.453' + }, { + startDate: new Date(2000,1,1,10,0,0), + endDate: new Date(2000,1,2,15,20,10,453), + expected: '29:20:10.453' } ].forEach(data => { assert.equal( From b1392c051076282ce81506b6cb61841d8348187d Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Sat, 16 Sep 2017 18:41:48 +0300 Subject: [PATCH 06/23] additional getFactorial test --- test/06-conditions-n-loops-tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/06-conditions-n-loops-tests.js b/test/06-conditions-n-loops-tests.js index 93ffa3eee..4d9ffe701 100644 --- a/test/06-conditions-n-loops-tests.js +++ b/test/06-conditions-n-loops-tests.js @@ -63,7 +63,8 @@ describe('06-conditions-n-loops-tasks', function() { [ { n: 1, expected: 1 }, { n: 5, expected: 120 }, - { n: 10, expected: 3628800 } + { n: 10, expected: 3628800 }, + { n: 41758, expected: Number.POSITIVE_INFINITY } ].forEach(data => { var actual = tasks.getFactorial(data.n); assert.equal( From c015aaee6849f00a5f60436b91777b266ae0d9b0 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Sat, 16 Sep 2017 19:24:25 +0300 Subject: [PATCH 07/23] depthTraversalTree test, timeout increase --- test/07-yield-tests.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index e22d92638..113859c8f 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -316,6 +316,7 @@ describe('07-yield-tasks', function() { }); it.optional('depthTraversalTree should process a wide tree', () => { + this.timeout(30000); var root = createWideTree(); var index = 1; for(let node of tasks.depthTraversalTree(root)) { From 40d6ba40e5304286535ee3962807fed7fa4cffb9 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Thu, 21 Sep 2017 10:43:05 +0300 Subject: [PATCH 08/23] async additional test --- test/07-yield-tests.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index 113859c8f..62005cfac 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -470,6 +470,29 @@ describe('07-yield-tasks', function() { }); }); + it.optional('async should resolve Promises and take values step by step', () => { + return new Promise((resolve, reject)=> { + tasks.async(function*() { + let a = yield new Promise((resolve)=> setTimeout(()=>resolve(5), 100)), + b = yield Promise.resolve(6), + c = yield Promise.resolve(6); + assert.equal(a, 5); + assert.equal(b, 6); + assert.equal(c, 6); + return yield new Promise((resolve)=> resolve(a + b + c)); + }).then(value=> { + try { + assert.equal(value, 17); + resolve() + } catch (err) { + reject(err); + } + }, (err)=> { + reject(err); + }); + }); + }); + it.optional('async should handle exception during generator work', () => { return new Promise((resolve, reject)=> { tasks.async(function*() { From df9bce06ef36fd3f2fa38eda0d52faa708268e57 Mon Sep 17 00:00:00 2001 From: Vadim Date: Fri, 22 Sep 2017 09:52:35 +0300 Subject: [PATCH 09/23] additional test for domino task --- test/10-katas-1-tests.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/10-katas-1-tests.js b/test/10-katas-1-tests.js index 0d9023da6..bf420882e 100644 --- a/test/10-katas-1-tests.js +++ b/test/10-katas-1-tests.js @@ -162,6 +162,8 @@ describe('10-katas-1-tasks', function() { [1,3], [2,3], [1,4], [2,4], [1,5], [2,5] ],[ [1,1], [1,2], [2,3], [2,5], [2,6], [3,6], [5,6], [6,6] + ],[ + [1,2], [2,1], [2,2] ] ].forEach(data => { var actual = tasks.canDominoesMakeRow(data); From 96f0d13e07a8fe941d6867b47c437424f4d834b3 Mon Sep 17 00:00:00 2001 From: Vadim Date: Tue, 26 Sep 2017 16:26:37 +0300 Subject: [PATCH 10/23] additional test to retry task --- test/09-functions-n-closures-tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/09-functions-n-closures-tests.js b/test/09-functions-n-closures-tests.js index 595713a90..e62f69d59 100644 --- a/test/09-functions-n-closures-tests.js +++ b/test/09-functions-n-closures-tests.js @@ -88,6 +88,20 @@ describe('09-functions-n-closures-tasks', function() { }); + it.optional('retry method should throw error when attemps is end', () => { + var maxAttemps = 3; + var attemps = 0; + var expected = 'expected'; + + var fn = function() { + if (++attemps { var log = ''; From 323599e2d584d2deb24f4d88b038bb4caabaabdd Mon Sep 17 00:00:00 2001 From: Vadim Date: Tue, 26 Sep 2017 16:38:45 +0300 Subject: [PATCH 11/23] fix --- test/09-functions-n-closures-tests.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/09-functions-n-closures-tests.js b/test/09-functions-n-closures-tests.js index e62f69d59..944476241 100644 --- a/test/09-functions-n-closures-tests.js +++ b/test/09-functions-n-closures-tests.js @@ -88,14 +88,13 @@ describe('09-functions-n-closures-tasks', function() { }); - it.optional('retry method should throw error when attemps is end', () => { + it.optional('retry method should throw error when attemps are end', () => { var maxAttemps = 3; var attemps = 0; var expected = 'expected'; var fn = function() { - if (++attemps Date: Tue, 26 Sep 2017 16:45:59 +0300 Subject: [PATCH 12/23] fix --- test/09-functions-n-closures-tests.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/09-functions-n-closures-tests.js b/test/09-functions-n-closures-tests.js index 944476241..595576413 100644 --- a/test/09-functions-n-closures-tests.js +++ b/test/09-functions-n-closures-tests.js @@ -88,10 +88,8 @@ describe('09-functions-n-closures-tasks', function() { }); - it.optional('retry method should throw error when attemps are end', () => { + it.optional('retry method should throw an error when attemps are end', () => { var maxAttemps = 3; - var attemps = 0; - var expected = 'expected'; var fn = function() { throw new Error(); From b57423934ff4ac53cf16543b216058d7cf8839e3 Mon Sep 17 00:00:00 2001 From: Vadim Date: Tue, 26 Sep 2017 18:00:32 +0300 Subject: [PATCH 13/23] retry test fix --- test/09-functions-n-closures-tests.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/09-functions-n-closures-tests.js b/test/09-functions-n-closures-tests.js index 595576413..6460d56b6 100644 --- a/test/09-functions-n-closures-tests.js +++ b/test/09-functions-n-closures-tests.js @@ -92,10 +92,16 @@ describe('09-functions-n-closures-tasks', function() { var maxAttemps = 3; var fn = function() { - throw new Error(); + throw new Error("fulyError"); } - + assert.throws(tasks.retry(fn, maxAttemps), Error); + + try { + tasks.retry(fn, maxAttemps)() + } catch (err) { + assert.equal(err.message, "fulyError", "retry method should throw an initial error"); + }; }); From 43cf153ca8b13759711459feb1ffc5a0c5878908 Mon Sep 17 00:00:00 2001 From: Vadim Date: Tue, 26 Sep 2017 18:33:39 +0300 Subject: [PATCH 14/23] fix --- test/09-functions-n-closures-tests.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/09-functions-n-closures-tests.js b/test/09-functions-n-closures-tests.js index 6460d56b6..7b5a0dbf8 100644 --- a/test/09-functions-n-closures-tests.js +++ b/test/09-functions-n-closures-tests.js @@ -95,13 +95,10 @@ describe('09-functions-n-closures-tasks', function() { throw new Error("fulyError"); } - assert.throws(tasks.retry(fn, maxAttemps), Error); - - try { - tasks.retry(fn, maxAttemps)() - } catch (err) { + assert.throws(tasks.retry(fn, maxAttemps), function (err) { assert.equal(err.message, "fulyError", "retry method should throw an initial error"); - }; + return true; + }); }); From 827e2c9097a1d272dc79952c8887309467f7940f Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Mon, 29 Jun 2020 21:40:12 +0300 Subject: [PATCH 15/23] travis --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a81b5c08a..79f9dff75 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Brest Rolling Scopes](http://brest.rollingscopes.com/images/logo_rs_text.svg)](http://brest.rollingscopes.com/) #Brest Rolling Scopes School -## Javascript Assignments [![Build Status](https://travis-ci.org/rolling-scopes-school/js-assignments.svg?branch=master)](https://travis-ci.org/rolling-scopes-school/js-assignments) +## Javascript Assignments [![Build Status](https://travis-ci.org/AisBrestEDU/js-assignments.svg?branch=master)](https://travis-ci.org/AisBrestEDU/js-assignments) Yet another javascript assignments. There are a lot of interactive javascript resources for beginners, but most of them are online and do not cover the modern programming workflow. There are some excellent training resources on github (https://github.com/rmurphey/js-assessment, https://github.com/mrdavidlaing/javascript-koans, https://github.com/vasanthk/js-bits etc) but they are not exactly simulate the everyday programming process. So the motivation of this project is to show TDD process in the wild to the beginners. Assingment tests are implemented in various ways to feel a difference and gain the experience what manner is good, what is bad and what is ugly. From f50b1c50796d46a4c7a626ffbe3fbd400261f8df Mon Sep 17 00:00:00 2001 From: alextrapper Date: Tue, 7 Jul 2020 23:07:55 +0300 Subject: [PATCH 16/23] Fix arguments ordering for assertions (#319) --- test/01-strings-tests.js | 90 +++++++++++++++--------------- test/02-numbers-tests.js | 116 +++++++++++++++++++-------------------- test/03-date-tests.js | 24 ++++---- test/04-arrays-tests.js | 108 ++++++++++++++++++------------------ test/07-yield-tests.js | 2 +- test/12-katas-3-tests.js | 2 +- 6 files changed, 171 insertions(+), 171 deletions(-) diff --git a/test/01-strings-tests.js b/test/01-strings-tests.js index e044644e5..98bbba03e 100644 --- a/test/01-strings-tests.js +++ b/test/01-strings-tests.js @@ -7,107 +7,107 @@ it.optional = require('../extensions/it-optional'); describe('01-strings-tasks', function() { it.optional('concatenateStrings should return concatenation of two strings', function() { - assert.equal('aabb', tasks.concatenateStrings('aa','bb')); - assert.equal('aa', tasks.concatenateStrings('aa','')); - assert.equal('bb', tasks.concatenateStrings('','bb')); + assert.equal(tasks.concatenateStrings('aa','bb'),'aabb'); + assert.equal(tasks.concatenateStrings('aa',''),'aa'); + assert.equal(tasks.concatenateStrings('','bb'),'bb'); }); it.optional('getStringLength should return the length of string', function() { - assert.equal(5, tasks.getStringLength('aaaaa'), "'aaaaa' length should be 5"); - assert.equal(0, tasks.getStringLength(''), "'' length should be 0"); + assert.equal(tasks.getStringLength('aaaaa'), "'aaaaa' length should be 5", 5); + assert.equal(tasks.getStringLength(''), "'' length should be 0", 0); }); it.optional('getStringFromTemplate should create a string from template using given parameters', function() { - assert.equal('Hello, John Doe!', tasks.getStringFromTemplate('John','Doe')); - assert.equal('Hello, Chuck Norris!', tasks.getStringFromTemplate('Chuck','Norris')); + assert.equal(tasks.getStringFromTemplate('John','Doe'), 'Hello, John Doe!'); + assert.equal(tasks.getStringFromTemplate('Chuck','Norris'), 'Hello, Chuck Norris!'); }); it.optional('getFirstChar should return the first char from given string', function() { - assert.equal('J', tasks.getFirstChar('John Doe')); - assert.equal('c', tasks.getFirstChar('cat')); + assert.equal(tasks.getFirstChar('John Doe'), 'J'); + assert.equal(tasks.getFirstChar('cat'), 'c'); }); it.optional('extractNameFromTemplate should parse the name from given string', function() { - assert.equal('John Doe', tasks.extractNameFromTemplate('Hello, John Doe!')); - assert.equal('Chuck Norris', tasks.extractNameFromTemplate('Hello, Chuck Norris!')); + assert.equal(tasks.extractNameFromTemplate('Hello, John Doe!'), 'John Doe'); + assert.equal(tasks.extractNameFromTemplate('Hello, Chuck Norris!'), 'Chuck Norris'); }); it.optional('removeLeadingAndTrailingWhitespaces should remove leading and trailing whitespaces from the string', function() { - assert.equal('Abracadabra', tasks.removeLeadingAndTrailingWhitespaces(' Abracadabra')); - assert.equal('cat', tasks.removeLeadingAndTrailingWhitespaces('cat')); - assert.equal('Hello, World!', tasks.removeLeadingAndTrailingWhitespaces('\tHello, World! ')); + assert.equal(tasks.removeLeadingAndTrailingWhitespaces(' Abracadabra'), 'Abracadabra'); + assert.equal(tasks.removeLeadingAndTrailingWhitespaces('cat'), 'cat'); + assert.equal(tasks.removeLeadingAndTrailingWhitespaces('\tHello, World! '), 'Hello, World!'); }); it.optional('repeatString should repeat string specified number of times', function() { - assert.equal('AAAAA', tasks.repeatString('A', 5)); - assert.equal('catcatcat', tasks.repeatString('cat', 3)); + assert.equal(tasks.repeatString('A', 5), 'AAAAA'); + assert.equal(tasks.repeatString('cat', 3), 'catcatcat'); }); it.optional('removeFirstOccurrences should remove all specified values from a string', function() { - assert.equal('To be or to be', tasks.removeFirstOccurrences('To be or not to be', ' not')); - assert.equal('I like legs', tasks.removeFirstOccurrences('I like legends', 'end')); - assert.equal('ABAB', tasks.removeFirstOccurrences('ABABAB','BA')); + assert.equal(tasks.removeFirstOccurrences('To be or not to be', ' not'), 'To be or to be'); + assert.equal(tasks.removeFirstOccurrences('I like legends', 'end'), 'I like legs'); + assert.equal(tasks.removeFirstOccurrences('ABABAB','BA'), 'ABAB'); }); it.optional('unbracketTag should remove first and last angle brackets from tag string', function() { - assert.equal('div', tasks.unbracketTag('
')); - assert.equal('span', tasks.unbracketTag('')); - assert.equal('a', tasks.unbracketTag('')); + assert.equal(tasks.unbracketTag('
'), 'div'); + assert.equal(tasks.unbracketTag(''), 'span'); + assert.equal(tasks.unbracketTag(''), 'a'); }); it.optional('convertToUpperCase should convert all chars from specified string into upper case', function() { - assert.equal('THUNDERSTRUCK', tasks.convertToUpperCase('Thunderstruck')); - assert.equal('ABCDEFGHIJKLMNOPQRSTUVWXYZ', tasks.convertToUpperCase('abcdefghijklmnopqrstuvwxyz')); + assert.equal(tasks.convertToUpperCase('Thunderstruck'), 'THUNDERSTRUCK'); + assert.equal(tasks.convertToUpperCase('abcdefghijklmnopqrstuvwxyz'), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'); }); it.optional('extractEmails should extract emails from string list delimeted by semicolons', function() { assert.deepEqual( - ['angus.young@gmail.com', 'brian.johnson@hotmail.com', 'bon.scott@yahoo.com'], - tasks.extractEmails('angus.young@gmail.com;brian.johnson@hotmail.com;bon.scott@yahoo.com') + tasks.extractEmails('angus.young@gmail.com;brian.johnson@hotmail.com;bon.scott@yahoo.com'), + ['angus.young@gmail.com', 'brian.johnson@hotmail.com', 'bon.scott@yahoo.com'] ); assert.deepEqual( - ['info@gmail.com'], - tasks.extractEmails('info@gmail.com') + tasks.extractEmails('info@gmail.com'), + ['info@gmail.com'] ); }); it.optional('getRectangleString should return the string reprentation of rectangle with specified size', function() { assert.equal( + tasks.getRectangleString(6, 4), '┌────┐\n'+ '│ │\n'+ '│ │\n'+ - '└────┘\n', - tasks.getRectangleString(6, 4) + '└────┘\n' ); assert.deepEqual( + tasks.getRectangleString(2, 2), '┌┐\n'+ - '└┘\n', - tasks.getRectangleString(2, 2) + '└┘\n' ); assert.deepEqual( + tasks.getRectangleString(12, 3), '┌──────────┐\n'+ '│ │\n'+ - '└──────────┘\n', - tasks.getRectangleString(12, 3) + '└──────────┘\n' ); }); it.optional('encodeToRot13 should encode-decode string using ROT13 algorithm', function() { - assert.equal('uryyb', tasks.encodeToRot13('hello')); - assert.equal('Jul qvq gur puvpxra pebff gur ebnq?', tasks.encodeToRot13('Why did the chicken cross the road?')); - assert.equal('To get to the other side!', tasks.encodeToRot13('Gb trg gb gur bgure fvqr!')); + assert.equal(tasks.encodeToRot13('hello'), 'uryyb'); + assert.equal(tasks.encodeToRot13('Why did the chicken cross the road?'), 'Jul qvq gur puvpxra pebff gur ebnq?'); + assert.equal(tasks.encodeToRot13('Gb trg gb gur bgure fvqr!'), 'To get to the other side!'); assert.equal( - 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm', - tasks.encodeToRot13('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') + tasks.encodeToRot13('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'), + 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm' ); }); it.optional('isString should return true if argument ia a string', function() { - assert.equal(false, tasks.isString(), "undefined"); - assert.equal(false, tasks.isString(null), "null"); - assert.equal(false, tasks.isString([]), "[]"); - assert.equal(true, tasks.isString('test'), "test"); - assert.equal(true, tasks.isString(new String('test')), "new String('test')"); + assert.equal(tasks.isString(), false, "undefined"); + assert.equal(tasks.isString(null), false, "null"); + assert.equal(tasks.isString([]), false, "[]"); + assert.equal(tasks.isString('test'), true, "test"); + assert.equal(tasks.isString(new String('test')), true, "new String('test')"); }); it.optional('getCardId should return the index of card in the initial deck', function() { @@ -118,8 +118,8 @@ describe('01-strings-tasks', function() { 'A♠','2♠','3♠','4♠','5♠','6♠','7♠','8♠','9♠','10♠','J♠','Q♠','K♠' ].forEach((val, index) => { assert.equal( - index, tasks.getCardId(val), + index, `Invalid id for card '${val}':` ) }); diff --git a/test/02-numbers-tests.js b/test/02-numbers-tests.js index d86b3e940..1ee356921 100644 --- a/test/02-numbers-tests.js +++ b/test/02-numbers-tests.js @@ -7,97 +7,97 @@ it.optional = require('../extensions/it-optional'); describe('02-numbers-tasks', function() { it.optional('getRectangleArea should return a square of rectangle', function() { - assert.equal(50, tasks.getRectangleArea(5, 10)); - assert.equal(25, tasks.getRectangleArea(5, 5)); + assert.equal(tasks.getRectangleArea(5, 10), 50); + assert.equal(tasks.getRectangleArea(5, 5), 25); }); it.optional('getCicleCircumference should return a circumference of cicle', function() { - assert.equal(31.41592653589793, tasks.getCicleCircumference(5)); - assert.equal(19.729201864543903, tasks.getCicleCircumference(3.14)); - assert.equal(0, tasks.getCicleCircumference(0)); + assert.equal(tasks.getCicleCircumference(5), 31.41592653589793); + assert.equal(tasks.getCicleCircumference(3.14), 19.729201864543903); + assert.equal(tasks.getCicleCircumference(0), 0); }); it.optional('getAverage should return an average of two numbers', function() { - assert.equal(5, tasks.getAverage(5, 5)); - assert.equal(5, tasks.getAverage(10, 0)); - assert.equal(0, tasks.getAverage(-3, 3)); - assert.equal(Number.MAX_VALUE-1, tasks.getAverage(Number.MAX_VALUE-2, Number.MAX_VALUE)); - assert.equal(Number.MAX_VALUE / 4, tasks.getAverage(Number.MAX_VALUE, -Number.MAX_VALUE / 2)); + assert.equal(tasks.getAverage(5, 5), 5); + assert.equal(tasks.getAverage(10, 0), 5); + assert.equal(tasks.getAverage(-3, 3), 0); + assert.equal(tasks.getAverage(Number.MAX_VALUE-2, Number.MAX_VALUE), Number.MAX_VALUE-1); + assert.equal(tasks.getAverage(Number.MAX_VALUE, -Number.MAX_VALUE / 2), Number.MAX_VALUE / 4); }); it.optional('getDistanceBetweenPoints should return a distance between points', function() { - assert.equal(1, tasks.getDistanceBetweenPoints(0, 0, 0, 1)); - assert.equal(1, tasks.getDistanceBetweenPoints(0, 0, 1, 0)); - assert.equal(18.027756377319946, tasks.getDistanceBetweenPoints(-5, 0, 10, -10)); + assert.equal(tasks.getDistanceBetweenPoints(0, 0, 0, 1), 1); + assert.equal(tasks.getDistanceBetweenPoints(0, 0, 1, 0), 1); + assert.equal(tasks.getDistanceBetweenPoints(-5, 0, 10, -10), 18.027756377319946); }); it.optional('getLinearEquationRoot should return a root of linear equation', function() { - assert.equal(2, tasks.getLinearEquationRoot(5, -10)); - assert.equal(-8, tasks.getLinearEquationRoot(1, 8)); - assert.equal(0, tasks.getLinearEquationRoot(5, 0)); + assert.equal(tasks.getLinearEquationRoot(5, -10), 2); + assert.equal(tasks.getLinearEquationRoot(1, 8), -8); + assert.equal(tasks.getLinearEquationRoot(5, 0), 0); }); it.optional('getAngleBetweenVectors should return a angle (in radians) between two linear vectors', function() { - assert.equal(Math.PI/2, tasks.getAngleBetweenVectors(1, 0, 0, 1)); - assert.equal(Math.PI, tasks.getAngleBetweenVectors(0, 1, 0, -1)); - assert.equal(Math.PI/2, tasks.getAngleBetweenVectors(0, -1, 1, 0)); - assert.equal(0, tasks.getAngleBetweenVectors(0, 1, 0, 1)); + assert.equal(tasks.getAngleBetweenVectors(1, 0, 0, 1), Math.PI/2); + assert.equal(tasks.getAngleBetweenVectors(0, 1, 0, -1), Math.PI); + assert.equal(tasks.getAngleBetweenVectors(0, -1, 1, 0), Math.PI/2); + assert.equal(tasks.getAngleBetweenVectors(0, 1, 0, 1), 0); }); it.optional('getLastDigit should return a last digit of the number', function() { - assert.equal(0, tasks.getLastDigit(100)); - assert.equal(7, tasks.getLastDigit(37)); - assert.equal(5, tasks.getLastDigit(5)); - assert.equal(0, tasks.getLastDigit(0)); + assert.equal(tasks.getLastDigit(100), 0); + assert.equal(tasks.getLastDigit(37), 7); + assert.equal(tasks.getLastDigit(5), 5); + assert.equal(tasks.getLastDigit(0), 0); }); it.optional('parseNumberFromString should return a number from the given string representation', function() { - assert.equal(100, tasks.parseNumberFromString('100')); - assert.equal(37, tasks.parseNumberFromString('37')); - assert.equal(-525.5, tasks.parseNumberFromString('-525.5')); + assert.equal(tasks.parseNumberFromString('100'), 100); + assert.equal(tasks.parseNumberFromString('37'), 37); + assert.equal(tasks.parseNumberFromString('-525.5'), -525.5); }); it.optional('getParallelipidedDiagonal should return a diagonal length of the rectagular parallepiped', function() { - assert.equal(Math.sqrt(3), tasks.getParallelipidedDiagonal(1,1,1)); - assert.equal(Math.sqrt(27), tasks.getParallelipidedDiagonal(3,3,3)); - //assert.equal(Math.sqrt(14), tasks.getParallelipidedDiagonal(1,2,3)); + assert.equal(tasks.getParallelipidedDiagonal(1,1,1), Math.sqrt(3)); + assert.equal(tasks.getParallelipidedDiagonal(3,3,3), Math.sqrt(27)); + //assert.equal(tasks.getParallelipidedDiagonal(1,2,3), Math.sqrt(14)); }); it.optional('roundToPowerOfTen should return an number rounded to specified power of 10', function() { - assert.equal(1234, tasks.roundToPowerOfTen(1234,0)); - assert.equal(1230, tasks.roundToPowerOfTen(1234,1)); - assert.equal(1200, tasks.roundToPowerOfTen(1234,2)); - assert.equal(1000, tasks.roundToPowerOfTen(1234,3)); + assert.equal(tasks.roundToPowerOfTen(1234,0), 1234); + assert.equal(tasks.roundToPowerOfTen(1234,1), 1230); + assert.equal(tasks.roundToPowerOfTen(1234,2), 1200); + assert.equal(tasks.roundToPowerOfTen(1234,3), 1000); - assert.equal(9678, tasks.roundToPowerOfTen(9678,0)); - assert.equal(9680, tasks.roundToPowerOfTen(9678,1)); - assert.equal(9700, tasks.roundToPowerOfTen(9678,2)); - assert.equal(10000, tasks.roundToPowerOfTen(9678,3)); + assert.equal(tasks.roundToPowerOfTen(9678,0), 9678); + assert.equal(tasks.roundToPowerOfTen(9678,1), 9680); + assert.equal(tasks.roundToPowerOfTen(9678,2), 9700); + assert.equal(tasks.roundToPowerOfTen(9678,3), 10000); }); it.optional('isPrime should return true if specified number is prime', function() { - assert.equal(true, tasks.isPrime(2), "2"); - assert.equal(true, tasks.isPrime(3), "3"); - assert.equal(false, tasks.isPrime(4), "4"); - assert.equal(true, tasks.isPrime(5), "5"); - assert.equal(false, tasks.isPrime(6), "6"); - assert.equal(true, tasks.isPrime(7), "7"); - assert.equal(false, tasks.isPrime(8), "8"); - assert.equal(false, tasks.isPrime(9), "9"); - assert.equal(false, tasks.isPrime(10), "10"); - assert.equal(true, tasks.isPrime(11), "11"); - assert.equal(false, tasks.isPrime(12), "12"); - assert.equal(true, tasks.isPrime(13), "13"); - assert.equal(true, tasks.isPrime(113), "113"); - assert.equal(false, tasks.isPrime(119), "119"); + assert.equal(tasks.isPrime(2), true, "2"); + assert.equal(tasks.isPrime(3), true, "3"); + assert.equal(tasks.isPrime(4), false, "4"); + assert.equal(tasks.isPrime(5), true, "5"); + assert.equal(tasks.isPrime(6), false, "6"); + assert.equal(tasks.isPrime(7), true, "7"); + assert.equal(tasks.isPrime(8), false, "8"); + assert.equal(tasks.isPrime(9), false, "9"); + assert.equal(tasks.isPrime(10), false, "10"); + assert.equal(tasks.isPrime(11), true, "11"); + assert.equal(tasks.isPrime(12), false, "12"); + assert.equal(tasks.isPrime(13), true, "13"); + assert.equal(tasks.isPrime(113), true, "113"); + assert.equal(tasks.isPrime(119), false, "119"); }); it.optional('toNumber should convert any value to number or return the default', function() { - assert.equal(0, tasks.toNumber(null, 0)); - assert.equal(0, tasks.toNumber('test', 0)); - assert.equal(1, tasks.toNumber('1', 0)); - assert.equal(42, tasks.toNumber(42, 0)); - assert.equal(42, tasks.toNumber(new Number(42), 0)); - assert.equal(-1, tasks.toNumber(undefined, -1)); + assert.equal(tasks.toNumber(null, 0), 9); + assert.equal(tasks.toNumber('test', 0), 0); + assert.equal(tasks.toNumber('1', 0), 1); + assert.equal(tasks.toNumber(42, 0), 42); + assert.equal(tasks.toNumber(new Number(42), 0), 42); + assert.equal(tasks.toNumber(undefined, -1), -1); }); }); diff --git a/test/03-date-tests.js b/test/03-date-tests.js index 62932f922..2493addba 100644 --- a/test/03-date-tests.js +++ b/test/03-date-tests.js @@ -8,31 +8,31 @@ describe('03-date-tasks', function() { it.optional('parseDataFromRfc2822 should parse rfc2822 string into a date value', function () { assert.equal( - new Date(1995, 11, 17, 3, 24, 0).valueOf(), - tasks.parseDataFromRfc2822('December 17, 1995 03:24:00').valueOf() + tasks.parseDataFromRfc2822('December 17, 1995 03:24:00').valueOf(), + new Date(1995, 11, 17, 3, 24, 0).valueOf() ); assert.equal( - 1453816082000, - tasks.parseDataFromRfc2822('Tue, 26 Jan 2016 13:48:02 GMT').valueOf() + tasks.parseDataFromRfc2822('Tue, 26 Jan 2016 13:48:02 GMT').valueOf(), + 1453816082000 ); assert.equal( - 895370400000, - tasks.parseDataFromRfc2822('Sun, 17 May 1998 03:00:00 GMT+0100').valueOf() + tasks.parseDataFromRfc2822('Sun, 17 May 1998 03:00:00 GMT+0100').valueOf(), + 895370400000 ); }); it.optional('parseDataFromIso8601 should parse ISO 8601 string into a date value', function () { assert.equal( - 1453219657000, - tasks.parseDataFromIso8601('2016-01-19T16:07:37+00:00').valueOf() + tasks.parseDataFromIso8601('2016-01-19T16:07:37+00:00').valueOf(), + 1453219657000 ); assert.equal( - 1453190857000, - tasks.parseDataFromIso8601('2016-01-19T08:07:37Z').valueOf() + tasks.parseDataFromIso8601('2016-01-19T08:07:37Z').valueOf(), + 1453190857000 ); }); @@ -90,8 +90,8 @@ describe('03-date-tasks', function() { } ].forEach(data => { assert.equal( - data.expected, - tasks.timeSpanToString(data.startDate, data.endDate) + tasks.timeSpanToString(data.startDate, data.endDate), + data.expected ); }); diff --git a/test/04-arrays-tests.js b/test/04-arrays-tests.js index eef6f904f..37e671a31 100644 --- a/test/04-arrays-tests.js +++ b/test/04-arrays-tests.js @@ -24,8 +24,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.findElement(data.arr, data.value); assert.equal( - data.expected, actual, + data.expected, `Index of '${data.value}' inside of [${data.arr}] = ${data.expected}, but actually ${actual}` ); }); @@ -49,8 +49,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - data.expected, - tasks.generateOdds(data.len) + tasks.generateOdds(data.len), + data.expected ); }); }); @@ -71,8 +71,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.doubleArray(data.arr); assert.deepEqual( - data.expected, actual, + data.expected, `The result of doubling [${data.arr}] is not correct` ); }); @@ -94,8 +94,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getArrayOfPositives(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -116,8 +116,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getArrayOfStrings(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -138,8 +138,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.removeFalsyValues(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -171,8 +171,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.findAllOccurences(data.arr, data.item); assert.equal( - data.expected, actual, + data.expected, `Number of occurences of ${JSON.stringify(data.item)} in ${JSON.stringify(data.arr)} is ${data.expected}, but actually ${actual})` ); }); @@ -191,8 +191,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getUpperCaseStrings(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -210,8 +210,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getStringsLength(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -233,8 +233,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { tasks.insertItem(data.arr, data.item, data.index); assert.deepEqual( - data.expected, - data.arr + data.arr, + data.expected ); }); }); @@ -253,8 +253,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - data.expected, - tasks.getHead(data.arr, data.n) + tasks.getHead(data.arr, data.n), + data.expected ); }); }); @@ -273,8 +273,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - data.expected, - tasks.getTail(data.arr, data.n) + tasks.getTail(data.arr, data.n), + data.expected ); }); }); @@ -301,8 +301,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toCsvText(data.arr); assert.equal( - data.expected, - actual + actual, + data.expected ); }); }); @@ -320,8 +320,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toArrayOfSquares(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -345,8 +345,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getMovingSum(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -367,8 +367,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getSecondItems(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -395,8 +395,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.propagateItemsByPositionIndex(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -423,8 +423,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.get3TopItems(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -451,8 +451,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getPositivesCount(data.arr); assert.equal( - data.expected, actual, + data.expected, `Test failed for argument [${data.arr}]` ); }); @@ -483,8 +483,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.sortDigitNamesByNumericOrder(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -505,8 +505,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getItemsSum(data.arr); assert.deepEqual( - data.expected, actual, + data.expected, `Test failed for [${data.arr}]` ); }); @@ -531,8 +531,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getFalsyValuesCount(data.arr); assert.deepEqual( - data.expected, actual, + data.expected, `Test failed for [${data.arr}]` ); }); @@ -554,8 +554,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toStringList(data.arr); assert.equal( - data.expected, - actual + actual, + data.expected ); }); }); @@ -630,8 +630,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.sortCitiesArray(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -657,8 +657,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getIdentityMatrix(data.n); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -693,8 +693,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getIntervalArray(data.start, data.end); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -718,8 +718,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.distinct(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -765,8 +765,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.group(data.arr, data.keySelector, data.valueSelector); assert.deepEqual( - Array.from(data.expected), - Array.from(actual) + Array.from(actual), + Array.from(data.expected) ); }); }); @@ -790,8 +790,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.selectMany(data.arr, data.childrenSelector); assert.deepStrictEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -815,8 +815,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getElementByIndexes(data.arr, data.indexes); assert.equal( - data.expected, actual, + data.expected, `getElementByIndexes(${JSON.stringify(data.arr)}, ${JSON.stringify(data.indexes)}) returns an incorrect result. Expected ${data.expected}, but actual ${actual}` ); }); @@ -844,8 +844,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.swapHeadAndTail(Array.from(data.arr)); assert.deepEqual( - data.expected, actual, + data.expected, `The result of swaping head and tail [${data.arr}] is not correct` ); }); diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index 62005cfac..e11b41e26 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -221,8 +221,8 @@ describe('07-yield-tasks', function() { } assert.equal( - expected.length, lineNo, + expected.length, 'Lines count is incorrect:' ); }); diff --git a/test/12-katas-3-tests.js b/test/12-katas-3-tests.js index 732e6e207..f1f6c21be 100644 --- a/test/12-katas-3-tests.js +++ b/test/12-katas-3-tests.js @@ -124,8 +124,8 @@ describe('12-katas-3-tasks', function() { var encoded = urlShortener.encode(data); var actual = urlShortener.decode(encoded); assert.equal( - data, actual, + data, `urlShortener.encode for "${data}" returns "${encoded}" but decode returns "${actual}"` ); }); From 72d82514b3330f9a898555502f9900e4a00cc861 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Wed, 8 Jul 2020 10:49:05 +0300 Subject: [PATCH 17/23] Revert "Fix arguments ordering for assertions (#319)" This reverts commit f50b1c50796d46a4c7a626ffbe3fbd400261f8df. --- test/01-strings-tests.js | 90 +++++++++++++++--------------- test/02-numbers-tests.js | 116 +++++++++++++++++++-------------------- test/03-date-tests.js | 24 ++++---- test/04-arrays-tests.js | 108 ++++++++++++++++++------------------ test/07-yield-tests.js | 2 +- test/12-katas-3-tests.js | 2 +- 6 files changed, 171 insertions(+), 171 deletions(-) diff --git a/test/01-strings-tests.js b/test/01-strings-tests.js index 98bbba03e..e044644e5 100644 --- a/test/01-strings-tests.js +++ b/test/01-strings-tests.js @@ -7,107 +7,107 @@ it.optional = require('../extensions/it-optional'); describe('01-strings-tasks', function() { it.optional('concatenateStrings should return concatenation of two strings', function() { - assert.equal(tasks.concatenateStrings('aa','bb'),'aabb'); - assert.equal(tasks.concatenateStrings('aa',''),'aa'); - assert.equal(tasks.concatenateStrings('','bb'),'bb'); + assert.equal('aabb', tasks.concatenateStrings('aa','bb')); + assert.equal('aa', tasks.concatenateStrings('aa','')); + assert.equal('bb', tasks.concatenateStrings('','bb')); }); it.optional('getStringLength should return the length of string', function() { - assert.equal(tasks.getStringLength('aaaaa'), "'aaaaa' length should be 5", 5); - assert.equal(tasks.getStringLength(''), "'' length should be 0", 0); + assert.equal(5, tasks.getStringLength('aaaaa'), "'aaaaa' length should be 5"); + assert.equal(0, tasks.getStringLength(''), "'' length should be 0"); }); it.optional('getStringFromTemplate should create a string from template using given parameters', function() { - assert.equal(tasks.getStringFromTemplate('John','Doe'), 'Hello, John Doe!'); - assert.equal(tasks.getStringFromTemplate('Chuck','Norris'), 'Hello, Chuck Norris!'); + assert.equal('Hello, John Doe!', tasks.getStringFromTemplate('John','Doe')); + assert.equal('Hello, Chuck Norris!', tasks.getStringFromTemplate('Chuck','Norris')); }); it.optional('getFirstChar should return the first char from given string', function() { - assert.equal(tasks.getFirstChar('John Doe'), 'J'); - assert.equal(tasks.getFirstChar('cat'), 'c'); + assert.equal('J', tasks.getFirstChar('John Doe')); + assert.equal('c', tasks.getFirstChar('cat')); }); it.optional('extractNameFromTemplate should parse the name from given string', function() { - assert.equal(tasks.extractNameFromTemplate('Hello, John Doe!'), 'John Doe'); - assert.equal(tasks.extractNameFromTemplate('Hello, Chuck Norris!'), 'Chuck Norris'); + assert.equal('John Doe', tasks.extractNameFromTemplate('Hello, John Doe!')); + assert.equal('Chuck Norris', tasks.extractNameFromTemplate('Hello, Chuck Norris!')); }); it.optional('removeLeadingAndTrailingWhitespaces should remove leading and trailing whitespaces from the string', function() { - assert.equal(tasks.removeLeadingAndTrailingWhitespaces(' Abracadabra'), 'Abracadabra'); - assert.equal(tasks.removeLeadingAndTrailingWhitespaces('cat'), 'cat'); - assert.equal(tasks.removeLeadingAndTrailingWhitespaces('\tHello, World! '), 'Hello, World!'); + assert.equal('Abracadabra', tasks.removeLeadingAndTrailingWhitespaces(' Abracadabra')); + assert.equal('cat', tasks.removeLeadingAndTrailingWhitespaces('cat')); + assert.equal('Hello, World!', tasks.removeLeadingAndTrailingWhitespaces('\tHello, World! ')); }); it.optional('repeatString should repeat string specified number of times', function() { - assert.equal(tasks.repeatString('A', 5), 'AAAAA'); - assert.equal(tasks.repeatString('cat', 3), 'catcatcat'); + assert.equal('AAAAA', tasks.repeatString('A', 5)); + assert.equal('catcatcat', tasks.repeatString('cat', 3)); }); it.optional('removeFirstOccurrences should remove all specified values from a string', function() { - assert.equal(tasks.removeFirstOccurrences('To be or not to be', ' not'), 'To be or to be'); - assert.equal(tasks.removeFirstOccurrences('I like legends', 'end'), 'I like legs'); - assert.equal(tasks.removeFirstOccurrences('ABABAB','BA'), 'ABAB'); + assert.equal('To be or to be', tasks.removeFirstOccurrences('To be or not to be', ' not')); + assert.equal('I like legs', tasks.removeFirstOccurrences('I like legends', 'end')); + assert.equal('ABAB', tasks.removeFirstOccurrences('ABABAB','BA')); }); it.optional('unbracketTag should remove first and last angle brackets from tag string', function() { - assert.equal(tasks.unbracketTag('
'), 'div'); - assert.equal(tasks.unbracketTag(''), 'span'); - assert.equal(tasks.unbracketTag(''), 'a'); + assert.equal('div', tasks.unbracketTag('
')); + assert.equal('span', tasks.unbracketTag('')); + assert.equal('a', tasks.unbracketTag('')); }); it.optional('convertToUpperCase should convert all chars from specified string into upper case', function() { - assert.equal(tasks.convertToUpperCase('Thunderstruck'), 'THUNDERSTRUCK'); - assert.equal(tasks.convertToUpperCase('abcdefghijklmnopqrstuvwxyz'), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'); + assert.equal('THUNDERSTRUCK', tasks.convertToUpperCase('Thunderstruck')); + assert.equal('ABCDEFGHIJKLMNOPQRSTUVWXYZ', tasks.convertToUpperCase('abcdefghijklmnopqrstuvwxyz')); }); it.optional('extractEmails should extract emails from string list delimeted by semicolons', function() { assert.deepEqual( - tasks.extractEmails('angus.young@gmail.com;brian.johnson@hotmail.com;bon.scott@yahoo.com'), - ['angus.young@gmail.com', 'brian.johnson@hotmail.com', 'bon.scott@yahoo.com'] + ['angus.young@gmail.com', 'brian.johnson@hotmail.com', 'bon.scott@yahoo.com'], + tasks.extractEmails('angus.young@gmail.com;brian.johnson@hotmail.com;bon.scott@yahoo.com') ); assert.deepEqual( - tasks.extractEmails('info@gmail.com'), - ['info@gmail.com'] + ['info@gmail.com'], + tasks.extractEmails('info@gmail.com') ); }); it.optional('getRectangleString should return the string reprentation of rectangle with specified size', function() { assert.equal( - tasks.getRectangleString(6, 4), '┌────┐\n'+ '│ │\n'+ '│ │\n'+ - '└────┘\n' + '└────┘\n', + tasks.getRectangleString(6, 4) ); assert.deepEqual( - tasks.getRectangleString(2, 2), '┌┐\n'+ - '└┘\n' + '└┘\n', + tasks.getRectangleString(2, 2) ); assert.deepEqual( - tasks.getRectangleString(12, 3), '┌──────────┐\n'+ '│ │\n'+ - '└──────────┘\n' + '└──────────┘\n', + tasks.getRectangleString(12, 3) ); }); it.optional('encodeToRot13 should encode-decode string using ROT13 algorithm', function() { - assert.equal(tasks.encodeToRot13('hello'), 'uryyb'); - assert.equal(tasks.encodeToRot13('Why did the chicken cross the road?'), 'Jul qvq gur puvpxra pebff gur ebnq?'); - assert.equal(tasks.encodeToRot13('Gb trg gb gur bgure fvqr!'), 'To get to the other side!'); + assert.equal('uryyb', tasks.encodeToRot13('hello')); + assert.equal('Jul qvq gur puvpxra pebff gur ebnq?', tasks.encodeToRot13('Why did the chicken cross the road?')); + assert.equal('To get to the other side!', tasks.encodeToRot13('Gb trg gb gur bgure fvqr!')); assert.equal( - tasks.encodeToRot13('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'), - 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm' + 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm', + tasks.encodeToRot13('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') ); }); it.optional('isString should return true if argument ia a string', function() { - assert.equal(tasks.isString(), false, "undefined"); - assert.equal(tasks.isString(null), false, "null"); - assert.equal(tasks.isString([]), false, "[]"); - assert.equal(tasks.isString('test'), true, "test"); - assert.equal(tasks.isString(new String('test')), true, "new String('test')"); + assert.equal(false, tasks.isString(), "undefined"); + assert.equal(false, tasks.isString(null), "null"); + assert.equal(false, tasks.isString([]), "[]"); + assert.equal(true, tasks.isString('test'), "test"); + assert.equal(true, tasks.isString(new String('test')), "new String('test')"); }); it.optional('getCardId should return the index of card in the initial deck', function() { @@ -118,8 +118,8 @@ describe('01-strings-tasks', function() { 'A♠','2♠','3♠','4♠','5♠','6♠','7♠','8♠','9♠','10♠','J♠','Q♠','K♠' ].forEach((val, index) => { assert.equal( - tasks.getCardId(val), index, + tasks.getCardId(val), `Invalid id for card '${val}':` ) }); diff --git a/test/02-numbers-tests.js b/test/02-numbers-tests.js index 1ee356921..d86b3e940 100644 --- a/test/02-numbers-tests.js +++ b/test/02-numbers-tests.js @@ -7,97 +7,97 @@ it.optional = require('../extensions/it-optional'); describe('02-numbers-tasks', function() { it.optional('getRectangleArea should return a square of rectangle', function() { - assert.equal(tasks.getRectangleArea(5, 10), 50); - assert.equal(tasks.getRectangleArea(5, 5), 25); + assert.equal(50, tasks.getRectangleArea(5, 10)); + assert.equal(25, tasks.getRectangleArea(5, 5)); }); it.optional('getCicleCircumference should return a circumference of cicle', function() { - assert.equal(tasks.getCicleCircumference(5), 31.41592653589793); - assert.equal(tasks.getCicleCircumference(3.14), 19.729201864543903); - assert.equal(tasks.getCicleCircumference(0), 0); + assert.equal(31.41592653589793, tasks.getCicleCircumference(5)); + assert.equal(19.729201864543903, tasks.getCicleCircumference(3.14)); + assert.equal(0, tasks.getCicleCircumference(0)); }); it.optional('getAverage should return an average of two numbers', function() { - assert.equal(tasks.getAverage(5, 5), 5); - assert.equal(tasks.getAverage(10, 0), 5); - assert.equal(tasks.getAverage(-3, 3), 0); - assert.equal(tasks.getAverage(Number.MAX_VALUE-2, Number.MAX_VALUE), Number.MAX_VALUE-1); - assert.equal(tasks.getAverage(Number.MAX_VALUE, -Number.MAX_VALUE / 2), Number.MAX_VALUE / 4); + assert.equal(5, tasks.getAverage(5, 5)); + assert.equal(5, tasks.getAverage(10, 0)); + assert.equal(0, tasks.getAverage(-3, 3)); + assert.equal(Number.MAX_VALUE-1, tasks.getAverage(Number.MAX_VALUE-2, Number.MAX_VALUE)); + assert.equal(Number.MAX_VALUE / 4, tasks.getAverage(Number.MAX_VALUE, -Number.MAX_VALUE / 2)); }); it.optional('getDistanceBetweenPoints should return a distance between points', function() { - assert.equal(tasks.getDistanceBetweenPoints(0, 0, 0, 1), 1); - assert.equal(tasks.getDistanceBetweenPoints(0, 0, 1, 0), 1); - assert.equal(tasks.getDistanceBetweenPoints(-5, 0, 10, -10), 18.027756377319946); + assert.equal(1, tasks.getDistanceBetweenPoints(0, 0, 0, 1)); + assert.equal(1, tasks.getDistanceBetweenPoints(0, 0, 1, 0)); + assert.equal(18.027756377319946, tasks.getDistanceBetweenPoints(-5, 0, 10, -10)); }); it.optional('getLinearEquationRoot should return a root of linear equation', function() { - assert.equal(tasks.getLinearEquationRoot(5, -10), 2); - assert.equal(tasks.getLinearEquationRoot(1, 8), -8); - assert.equal(tasks.getLinearEquationRoot(5, 0), 0); + assert.equal(2, tasks.getLinearEquationRoot(5, -10)); + assert.equal(-8, tasks.getLinearEquationRoot(1, 8)); + assert.equal(0, tasks.getLinearEquationRoot(5, 0)); }); it.optional('getAngleBetweenVectors should return a angle (in radians) between two linear vectors', function() { - assert.equal(tasks.getAngleBetweenVectors(1, 0, 0, 1), Math.PI/2); - assert.equal(tasks.getAngleBetweenVectors(0, 1, 0, -1), Math.PI); - assert.equal(tasks.getAngleBetweenVectors(0, -1, 1, 0), Math.PI/2); - assert.equal(tasks.getAngleBetweenVectors(0, 1, 0, 1), 0); + assert.equal(Math.PI/2, tasks.getAngleBetweenVectors(1, 0, 0, 1)); + assert.equal(Math.PI, tasks.getAngleBetweenVectors(0, 1, 0, -1)); + assert.equal(Math.PI/2, tasks.getAngleBetweenVectors(0, -1, 1, 0)); + assert.equal(0, tasks.getAngleBetweenVectors(0, 1, 0, 1)); }); it.optional('getLastDigit should return a last digit of the number', function() { - assert.equal(tasks.getLastDigit(100), 0); - assert.equal(tasks.getLastDigit(37), 7); - assert.equal(tasks.getLastDigit(5), 5); - assert.equal(tasks.getLastDigit(0), 0); + assert.equal(0, tasks.getLastDigit(100)); + assert.equal(7, tasks.getLastDigit(37)); + assert.equal(5, tasks.getLastDigit(5)); + assert.equal(0, tasks.getLastDigit(0)); }); it.optional('parseNumberFromString should return a number from the given string representation', function() { - assert.equal(tasks.parseNumberFromString('100'), 100); - assert.equal(tasks.parseNumberFromString('37'), 37); - assert.equal(tasks.parseNumberFromString('-525.5'), -525.5); + assert.equal(100, tasks.parseNumberFromString('100')); + assert.equal(37, tasks.parseNumberFromString('37')); + assert.equal(-525.5, tasks.parseNumberFromString('-525.5')); }); it.optional('getParallelipidedDiagonal should return a diagonal length of the rectagular parallepiped', function() { - assert.equal(tasks.getParallelipidedDiagonal(1,1,1), Math.sqrt(3)); - assert.equal(tasks.getParallelipidedDiagonal(3,3,3), Math.sqrt(27)); - //assert.equal(tasks.getParallelipidedDiagonal(1,2,3), Math.sqrt(14)); + assert.equal(Math.sqrt(3), tasks.getParallelipidedDiagonal(1,1,1)); + assert.equal(Math.sqrt(27), tasks.getParallelipidedDiagonal(3,3,3)); + //assert.equal(Math.sqrt(14), tasks.getParallelipidedDiagonal(1,2,3)); }); it.optional('roundToPowerOfTen should return an number rounded to specified power of 10', function() { - assert.equal(tasks.roundToPowerOfTen(1234,0), 1234); - assert.equal(tasks.roundToPowerOfTen(1234,1), 1230); - assert.equal(tasks.roundToPowerOfTen(1234,2), 1200); - assert.equal(tasks.roundToPowerOfTen(1234,3), 1000); + assert.equal(1234, tasks.roundToPowerOfTen(1234,0)); + assert.equal(1230, tasks.roundToPowerOfTen(1234,1)); + assert.equal(1200, tasks.roundToPowerOfTen(1234,2)); + assert.equal(1000, tasks.roundToPowerOfTen(1234,3)); - assert.equal(tasks.roundToPowerOfTen(9678,0), 9678); - assert.equal(tasks.roundToPowerOfTen(9678,1), 9680); - assert.equal(tasks.roundToPowerOfTen(9678,2), 9700); - assert.equal(tasks.roundToPowerOfTen(9678,3), 10000); + assert.equal(9678, tasks.roundToPowerOfTen(9678,0)); + assert.equal(9680, tasks.roundToPowerOfTen(9678,1)); + assert.equal(9700, tasks.roundToPowerOfTen(9678,2)); + assert.equal(10000, tasks.roundToPowerOfTen(9678,3)); }); it.optional('isPrime should return true if specified number is prime', function() { - assert.equal(tasks.isPrime(2), true, "2"); - assert.equal(tasks.isPrime(3), true, "3"); - assert.equal(tasks.isPrime(4), false, "4"); - assert.equal(tasks.isPrime(5), true, "5"); - assert.equal(tasks.isPrime(6), false, "6"); - assert.equal(tasks.isPrime(7), true, "7"); - assert.equal(tasks.isPrime(8), false, "8"); - assert.equal(tasks.isPrime(9), false, "9"); - assert.equal(tasks.isPrime(10), false, "10"); - assert.equal(tasks.isPrime(11), true, "11"); - assert.equal(tasks.isPrime(12), false, "12"); - assert.equal(tasks.isPrime(13), true, "13"); - assert.equal(tasks.isPrime(113), true, "113"); - assert.equal(tasks.isPrime(119), false, "119"); + assert.equal(true, tasks.isPrime(2), "2"); + assert.equal(true, tasks.isPrime(3), "3"); + assert.equal(false, tasks.isPrime(4), "4"); + assert.equal(true, tasks.isPrime(5), "5"); + assert.equal(false, tasks.isPrime(6), "6"); + assert.equal(true, tasks.isPrime(7), "7"); + assert.equal(false, tasks.isPrime(8), "8"); + assert.equal(false, tasks.isPrime(9), "9"); + assert.equal(false, tasks.isPrime(10), "10"); + assert.equal(true, tasks.isPrime(11), "11"); + assert.equal(false, tasks.isPrime(12), "12"); + assert.equal(true, tasks.isPrime(13), "13"); + assert.equal(true, tasks.isPrime(113), "113"); + assert.equal(false, tasks.isPrime(119), "119"); }); it.optional('toNumber should convert any value to number or return the default', function() { - assert.equal(tasks.toNumber(null, 0), 9); - assert.equal(tasks.toNumber('test', 0), 0); - assert.equal(tasks.toNumber('1', 0), 1); - assert.equal(tasks.toNumber(42, 0), 42); - assert.equal(tasks.toNumber(new Number(42), 0), 42); - assert.equal(tasks.toNumber(undefined, -1), -1); + assert.equal(0, tasks.toNumber(null, 0)); + assert.equal(0, tasks.toNumber('test', 0)); + assert.equal(1, tasks.toNumber('1', 0)); + assert.equal(42, tasks.toNumber(42, 0)); + assert.equal(42, tasks.toNumber(new Number(42), 0)); + assert.equal(-1, tasks.toNumber(undefined, -1)); }); }); diff --git a/test/03-date-tests.js b/test/03-date-tests.js index 2493addba..62932f922 100644 --- a/test/03-date-tests.js +++ b/test/03-date-tests.js @@ -8,31 +8,31 @@ describe('03-date-tasks', function() { it.optional('parseDataFromRfc2822 should parse rfc2822 string into a date value', function () { assert.equal( - tasks.parseDataFromRfc2822('December 17, 1995 03:24:00').valueOf(), - new Date(1995, 11, 17, 3, 24, 0).valueOf() + new Date(1995, 11, 17, 3, 24, 0).valueOf(), + tasks.parseDataFromRfc2822('December 17, 1995 03:24:00').valueOf() ); assert.equal( - tasks.parseDataFromRfc2822('Tue, 26 Jan 2016 13:48:02 GMT').valueOf(), - 1453816082000 + 1453816082000, + tasks.parseDataFromRfc2822('Tue, 26 Jan 2016 13:48:02 GMT').valueOf() ); assert.equal( - tasks.parseDataFromRfc2822('Sun, 17 May 1998 03:00:00 GMT+0100').valueOf(), - 895370400000 + 895370400000, + tasks.parseDataFromRfc2822('Sun, 17 May 1998 03:00:00 GMT+0100').valueOf() ); }); it.optional('parseDataFromIso8601 should parse ISO 8601 string into a date value', function () { assert.equal( - tasks.parseDataFromIso8601('2016-01-19T16:07:37+00:00').valueOf(), - 1453219657000 + 1453219657000, + tasks.parseDataFromIso8601('2016-01-19T16:07:37+00:00').valueOf() ); assert.equal( - tasks.parseDataFromIso8601('2016-01-19T08:07:37Z').valueOf(), - 1453190857000 + 1453190857000, + tasks.parseDataFromIso8601('2016-01-19T08:07:37Z').valueOf() ); }); @@ -90,8 +90,8 @@ describe('03-date-tasks', function() { } ].forEach(data => { assert.equal( - tasks.timeSpanToString(data.startDate, data.endDate), - data.expected + data.expected, + tasks.timeSpanToString(data.startDate, data.endDate) ); }); diff --git a/test/04-arrays-tests.js b/test/04-arrays-tests.js index 37e671a31..eef6f904f 100644 --- a/test/04-arrays-tests.js +++ b/test/04-arrays-tests.js @@ -24,8 +24,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.findElement(data.arr, data.value); assert.equal( - actual, data.expected, + actual, `Index of '${data.value}' inside of [${data.arr}] = ${data.expected}, but actually ${actual}` ); }); @@ -49,8 +49,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - tasks.generateOdds(data.len), - data.expected + data.expected, + tasks.generateOdds(data.len) ); }); }); @@ -71,8 +71,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.doubleArray(data.arr); assert.deepEqual( - actual, data.expected, + actual, `The result of doubling [${data.arr}] is not correct` ); }); @@ -94,8 +94,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getArrayOfPositives(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -116,8 +116,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getArrayOfStrings(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -138,8 +138,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.removeFalsyValues(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -171,8 +171,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.findAllOccurences(data.arr, data.item); assert.equal( - actual, data.expected, + actual, `Number of occurences of ${JSON.stringify(data.item)} in ${JSON.stringify(data.arr)} is ${data.expected}, but actually ${actual})` ); }); @@ -191,8 +191,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getUpperCaseStrings(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -210,8 +210,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getStringsLength(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -233,8 +233,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { tasks.insertItem(data.arr, data.item, data.index); assert.deepEqual( - data.arr, - data.expected + data.expected, + data.arr ); }); }); @@ -253,8 +253,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - tasks.getHead(data.arr, data.n), - data.expected + data.expected, + tasks.getHead(data.arr, data.n) ); }); }); @@ -273,8 +273,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - tasks.getTail(data.arr, data.n), - data.expected + data.expected, + tasks.getTail(data.arr, data.n) ); }); }); @@ -301,8 +301,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toCsvText(data.arr); assert.equal( - actual, - data.expected + data.expected, + actual ); }); }); @@ -320,8 +320,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toArrayOfSquares(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -345,8 +345,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getMovingSum(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -367,8 +367,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getSecondItems(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -395,8 +395,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.propagateItemsByPositionIndex(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -423,8 +423,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.get3TopItems(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -451,8 +451,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getPositivesCount(data.arr); assert.equal( - actual, data.expected, + actual, `Test failed for argument [${data.arr}]` ); }); @@ -483,8 +483,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.sortDigitNamesByNumericOrder(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -505,8 +505,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getItemsSum(data.arr); assert.deepEqual( - actual, data.expected, + actual, `Test failed for [${data.arr}]` ); }); @@ -531,8 +531,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getFalsyValuesCount(data.arr); assert.deepEqual( - actual, data.expected, + actual, `Test failed for [${data.arr}]` ); }); @@ -554,8 +554,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toStringList(data.arr); assert.equal( - actual, - data.expected + data.expected, + actual ); }); }); @@ -630,8 +630,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.sortCitiesArray(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -657,8 +657,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getIdentityMatrix(data.n); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -693,8 +693,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getIntervalArray(data.start, data.end); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -718,8 +718,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.distinct(data.arr); assert.deepEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -765,8 +765,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.group(data.arr, data.keySelector, data.valueSelector); assert.deepEqual( - Array.from(actual), - Array.from(data.expected) + Array.from(data.expected), + Array.from(actual) ); }); }); @@ -790,8 +790,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.selectMany(data.arr, data.childrenSelector); assert.deepStrictEqual( - actual, - data.expected + data.expected, + actual ); }); }); @@ -815,8 +815,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getElementByIndexes(data.arr, data.indexes); assert.equal( - actual, data.expected, + actual, `getElementByIndexes(${JSON.stringify(data.arr)}, ${JSON.stringify(data.indexes)}) returns an incorrect result. Expected ${data.expected}, but actual ${actual}` ); }); @@ -844,8 +844,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.swapHeadAndTail(Array.from(data.arr)); assert.deepEqual( - actual, data.expected, + actual, `The result of swaping head and tail [${data.arr}] is not correct` ); }); diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index e11b41e26..62005cfac 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -221,8 +221,8 @@ describe('07-yield-tasks', function() { } assert.equal( - lineNo, expected.length, + lineNo, 'Lines count is incorrect:' ); }); diff --git a/test/12-katas-3-tests.js b/test/12-katas-3-tests.js index f1f6c21be..732e6e207 100644 --- a/test/12-katas-3-tests.js +++ b/test/12-katas-3-tests.js @@ -124,8 +124,8 @@ describe('12-katas-3-tasks', function() { var encoded = urlShortener.encode(data); var actual = urlShortener.decode(encoded); assert.equal( - actual, data, + actual, `urlShortener.encode for "${data}" returns "${encoded}" but decode returns "${actual}"` ); }); From 73899bd62ea419f3ed2537facd5722691bcbb120 Mon Sep 17 00:00:00 2001 From: alextrapper Date: Wed, 15 Jul 2020 18:43:55 +0300 Subject: [PATCH 18/23] Fix arguments ordering for assertions (#369) --- test/01-strings-tests.js | 90 +++++++++++++++--------------- test/02-numbers-tests.js | 116 +++++++++++++++++++-------------------- test/03-date-tests.js | 24 ++++---- test/04-arrays-tests.js | 108 ++++++++++++++++++------------------ test/07-yield-tests.js | 2 +- test/12-katas-3-tests.js | 2 +- 6 files changed, 171 insertions(+), 171 deletions(-) diff --git a/test/01-strings-tests.js b/test/01-strings-tests.js index e044644e5..0b2793041 100644 --- a/test/01-strings-tests.js +++ b/test/01-strings-tests.js @@ -7,107 +7,107 @@ it.optional = require('../extensions/it-optional'); describe('01-strings-tasks', function() { it.optional('concatenateStrings should return concatenation of two strings', function() { - assert.equal('aabb', tasks.concatenateStrings('aa','bb')); - assert.equal('aa', tasks.concatenateStrings('aa','')); - assert.equal('bb', tasks.concatenateStrings('','bb')); + assert.equal(tasks.concatenateStrings('aa','bb'),'aabb'); + assert.equal(tasks.concatenateStrings('aa',''),'aa'); + assert.equal(tasks.concatenateStrings('','bb'),'bb'); }); it.optional('getStringLength should return the length of string', function() { - assert.equal(5, tasks.getStringLength('aaaaa'), "'aaaaa' length should be 5"); - assert.equal(0, tasks.getStringLength(''), "'' length should be 0"); + assert.equal(tasks.getStringLength('aaaaa'), 5, "'aaaaa' length should be 5"); + assert.equal(tasks.getStringLength(''), 0, "'' length should be 0"); }); it.optional('getStringFromTemplate should create a string from template using given parameters', function() { - assert.equal('Hello, John Doe!', tasks.getStringFromTemplate('John','Doe')); - assert.equal('Hello, Chuck Norris!', tasks.getStringFromTemplate('Chuck','Norris')); + assert.equal(tasks.getStringFromTemplate('John','Doe'), 'Hello, John Doe!'); + assert.equal(tasks.getStringFromTemplate('Chuck','Norris'), 'Hello, Chuck Norris!'); }); it.optional('getFirstChar should return the first char from given string', function() { - assert.equal('J', tasks.getFirstChar('John Doe')); - assert.equal('c', tasks.getFirstChar('cat')); + assert.equal(tasks.getFirstChar('John Doe'), 'J'); + assert.equal(tasks.getFirstChar('cat'), 'c'); }); it.optional('extractNameFromTemplate should parse the name from given string', function() { - assert.equal('John Doe', tasks.extractNameFromTemplate('Hello, John Doe!')); - assert.equal('Chuck Norris', tasks.extractNameFromTemplate('Hello, Chuck Norris!')); + assert.equal(tasks.extractNameFromTemplate('Hello, John Doe!'), 'John Doe'); + assert.equal(tasks.extractNameFromTemplate('Hello, Chuck Norris!'), 'Chuck Norris'); }); it.optional('removeLeadingAndTrailingWhitespaces should remove leading and trailing whitespaces from the string', function() { - assert.equal('Abracadabra', tasks.removeLeadingAndTrailingWhitespaces(' Abracadabra')); - assert.equal('cat', tasks.removeLeadingAndTrailingWhitespaces('cat')); - assert.equal('Hello, World!', tasks.removeLeadingAndTrailingWhitespaces('\tHello, World! ')); + assert.equal(tasks.removeLeadingAndTrailingWhitespaces(' Abracadabra'), 'Abracadabra'); + assert.equal(tasks.removeLeadingAndTrailingWhitespaces('cat'), 'cat'); + assert.equal(tasks.removeLeadingAndTrailingWhitespaces('\tHello, World! '), 'Hello, World!'); }); it.optional('repeatString should repeat string specified number of times', function() { - assert.equal('AAAAA', tasks.repeatString('A', 5)); - assert.equal('catcatcat', tasks.repeatString('cat', 3)); + assert.equal(tasks.repeatString('A', 5), 'AAAAA'); + assert.equal(tasks.repeatString('cat', 3), 'catcatcat'); }); it.optional('removeFirstOccurrences should remove all specified values from a string', function() { - assert.equal('To be or to be', tasks.removeFirstOccurrences('To be or not to be', ' not')); - assert.equal('I like legs', tasks.removeFirstOccurrences('I like legends', 'end')); - assert.equal('ABAB', tasks.removeFirstOccurrences('ABABAB','BA')); + assert.equal(tasks.removeFirstOccurrences('To be or not to be', ' not'), 'To be or to be'); + assert.equal(tasks.removeFirstOccurrences('I like legends', 'end'), 'I like legs'); + assert.equal(tasks.removeFirstOccurrences('ABABAB','BA'), 'ABAB'); }); it.optional('unbracketTag should remove first and last angle brackets from tag string', function() { - assert.equal('div', tasks.unbracketTag('
')); - assert.equal('span', tasks.unbracketTag('')); - assert.equal('a', tasks.unbracketTag('')); + assert.equal(tasks.unbracketTag('
'), 'div'); + assert.equal(tasks.unbracketTag(''), 'span'); + assert.equal(tasks.unbracketTag(''), 'a'); }); it.optional('convertToUpperCase should convert all chars from specified string into upper case', function() { - assert.equal('THUNDERSTRUCK', tasks.convertToUpperCase('Thunderstruck')); - assert.equal('ABCDEFGHIJKLMNOPQRSTUVWXYZ', tasks.convertToUpperCase('abcdefghijklmnopqrstuvwxyz')); + assert.equal(tasks.convertToUpperCase('Thunderstruck'), 'THUNDERSTRUCK'); + assert.equal(tasks.convertToUpperCase('abcdefghijklmnopqrstuvwxyz'), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'); }); it.optional('extractEmails should extract emails from string list delimeted by semicolons', function() { assert.deepEqual( - ['angus.young@gmail.com', 'brian.johnson@hotmail.com', 'bon.scott@yahoo.com'], - tasks.extractEmails('angus.young@gmail.com;brian.johnson@hotmail.com;bon.scott@yahoo.com') + tasks.extractEmails('angus.young@gmail.com;brian.johnson@hotmail.com;bon.scott@yahoo.com'), + ['angus.young@gmail.com', 'brian.johnson@hotmail.com', 'bon.scott@yahoo.com'] ); assert.deepEqual( - ['info@gmail.com'], - tasks.extractEmails('info@gmail.com') + tasks.extractEmails('info@gmail.com'), + ['info@gmail.com'] ); }); it.optional('getRectangleString should return the string reprentation of rectangle with specified size', function() { assert.equal( + tasks.getRectangleString(6, 4), '┌────┐\n'+ '│ │\n'+ '│ │\n'+ - '└────┘\n', - tasks.getRectangleString(6, 4) + '└────┘\n' ); assert.deepEqual( + tasks.getRectangleString(2, 2), '┌┐\n'+ - '└┘\n', - tasks.getRectangleString(2, 2) + '└┘\n' ); assert.deepEqual( + tasks.getRectangleString(12, 3), '┌──────────┐\n'+ '│ │\n'+ - '└──────────┘\n', - tasks.getRectangleString(12, 3) + '└──────────┘\n' ); }); it.optional('encodeToRot13 should encode-decode string using ROT13 algorithm', function() { - assert.equal('uryyb', tasks.encodeToRot13('hello')); - assert.equal('Jul qvq gur puvpxra pebff gur ebnq?', tasks.encodeToRot13('Why did the chicken cross the road?')); - assert.equal('To get to the other side!', tasks.encodeToRot13('Gb trg gb gur bgure fvqr!')); + assert.equal(tasks.encodeToRot13('hello'), 'uryyb'); + assert.equal(tasks.encodeToRot13('Why did the chicken cross the road?'), 'Jul qvq gur puvpxra pebff gur ebnq?'); + assert.equal(tasks.encodeToRot13('Gb trg gb gur bgure fvqr!'), 'To get to the other side!'); assert.equal( - 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm', - tasks.encodeToRot13('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') + tasks.encodeToRot13('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'), + 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm' ); }); it.optional('isString should return true if argument ia a string', function() { - assert.equal(false, tasks.isString(), "undefined"); - assert.equal(false, tasks.isString(null), "null"); - assert.equal(false, tasks.isString([]), "[]"); - assert.equal(true, tasks.isString('test'), "test"); - assert.equal(true, tasks.isString(new String('test')), "new String('test')"); + assert.equal(tasks.isString(), false, "undefined"); + assert.equal(tasks.isString(null), false, "null"); + assert.equal(tasks.isString([]), false, "[]"); + assert.equal(tasks.isString('test'), true, "test"); + assert.equal(tasks.isString(new String('test')), true, "new String('test')"); }); it.optional('getCardId should return the index of card in the initial deck', function() { @@ -118,8 +118,8 @@ describe('01-strings-tasks', function() { 'A♠','2♠','3♠','4♠','5♠','6♠','7♠','8♠','9♠','10♠','J♠','Q♠','K♠' ].forEach((val, index) => { assert.equal( - index, tasks.getCardId(val), + index, `Invalid id for card '${val}':` ) }); diff --git a/test/02-numbers-tests.js b/test/02-numbers-tests.js index d86b3e940..bdcecbb73 100644 --- a/test/02-numbers-tests.js +++ b/test/02-numbers-tests.js @@ -7,97 +7,97 @@ it.optional = require('../extensions/it-optional'); describe('02-numbers-tasks', function() { it.optional('getRectangleArea should return a square of rectangle', function() { - assert.equal(50, tasks.getRectangleArea(5, 10)); - assert.equal(25, tasks.getRectangleArea(5, 5)); + assert.equal(tasks.getRectangleArea(5, 10), 50); + assert.equal(tasks.getRectangleArea(5, 5), 25); }); it.optional('getCicleCircumference should return a circumference of cicle', function() { - assert.equal(31.41592653589793, tasks.getCicleCircumference(5)); - assert.equal(19.729201864543903, tasks.getCicleCircumference(3.14)); - assert.equal(0, tasks.getCicleCircumference(0)); + assert.equal(tasks.getCicleCircumference(5), 31.41592653589793); + assert.equal(tasks.getCicleCircumference(3.14), 19.729201864543903); + assert.equal(tasks.getCicleCircumference(0), 0); }); it.optional('getAverage should return an average of two numbers', function() { - assert.equal(5, tasks.getAverage(5, 5)); - assert.equal(5, tasks.getAverage(10, 0)); - assert.equal(0, tasks.getAverage(-3, 3)); - assert.equal(Number.MAX_VALUE-1, tasks.getAverage(Number.MAX_VALUE-2, Number.MAX_VALUE)); - assert.equal(Number.MAX_VALUE / 4, tasks.getAverage(Number.MAX_VALUE, -Number.MAX_VALUE / 2)); + assert.equal(tasks.getAverage(5, 5), 5); + assert.equal(tasks.getAverage(10, 0), 5); + assert.equal(tasks.getAverage(-3, 3), 0); + assert.equal(tasks.getAverage(Number.MAX_VALUE-2, Number.MAX_VALUE), Number.MAX_VALUE-1); + assert.equal(tasks.getAverage(Number.MAX_VALUE, -Number.MAX_VALUE / 2), Number.MAX_VALUE / 4); }); it.optional('getDistanceBetweenPoints should return a distance between points', function() { - assert.equal(1, tasks.getDistanceBetweenPoints(0, 0, 0, 1)); - assert.equal(1, tasks.getDistanceBetweenPoints(0, 0, 1, 0)); - assert.equal(18.027756377319946, tasks.getDistanceBetweenPoints(-5, 0, 10, -10)); + assert.equal(tasks.getDistanceBetweenPoints(0, 0, 0, 1), 1); + assert.equal(tasks.getDistanceBetweenPoints(0, 0, 1, 0), 1); + assert.equal(tasks.getDistanceBetweenPoints(-5, 0, 10, -10), 18.027756377319946); }); it.optional('getLinearEquationRoot should return a root of linear equation', function() { - assert.equal(2, tasks.getLinearEquationRoot(5, -10)); - assert.equal(-8, tasks.getLinearEquationRoot(1, 8)); - assert.equal(0, tasks.getLinearEquationRoot(5, 0)); + assert.equal(tasks.getLinearEquationRoot(5, -10), 2); + assert.equal(tasks.getLinearEquationRoot(1, 8), -8); + assert.equal(tasks.getLinearEquationRoot(5, 0), 0); }); it.optional('getAngleBetweenVectors should return a angle (in radians) between two linear vectors', function() { - assert.equal(Math.PI/2, tasks.getAngleBetweenVectors(1, 0, 0, 1)); - assert.equal(Math.PI, tasks.getAngleBetweenVectors(0, 1, 0, -1)); - assert.equal(Math.PI/2, tasks.getAngleBetweenVectors(0, -1, 1, 0)); - assert.equal(0, tasks.getAngleBetweenVectors(0, 1, 0, 1)); + assert.equal(tasks.getAngleBetweenVectors(1, 0, 0, 1), Math.PI/2); + assert.equal(tasks.getAngleBetweenVectors(0, 1, 0, -1), Math.PI); + assert.equal(tasks.getAngleBetweenVectors(0, -1, 1, 0), Math.PI/2); + assert.equal(tasks.getAngleBetweenVectors(0, 1, 0, 1), 0); }); it.optional('getLastDigit should return a last digit of the number', function() { - assert.equal(0, tasks.getLastDigit(100)); - assert.equal(7, tasks.getLastDigit(37)); - assert.equal(5, tasks.getLastDigit(5)); - assert.equal(0, tasks.getLastDigit(0)); + assert.equal(tasks.getLastDigit(100), 0); + assert.equal(tasks.getLastDigit(37), 7); + assert.equal(tasks.getLastDigit(5), 5); + assert.equal(tasks.getLastDigit(0), 0); }); it.optional('parseNumberFromString should return a number from the given string representation', function() { - assert.equal(100, tasks.parseNumberFromString('100')); - assert.equal(37, tasks.parseNumberFromString('37')); - assert.equal(-525.5, tasks.parseNumberFromString('-525.5')); + assert.equal(tasks.parseNumberFromString('100'), 100); + assert.equal(tasks.parseNumberFromString('37'), 37); + assert.equal(tasks.parseNumberFromString('-525.5'), -525.5); }); it.optional('getParallelipidedDiagonal should return a diagonal length of the rectagular parallepiped', function() { - assert.equal(Math.sqrt(3), tasks.getParallelipidedDiagonal(1,1,1)); - assert.equal(Math.sqrt(27), tasks.getParallelipidedDiagonal(3,3,3)); - //assert.equal(Math.sqrt(14), tasks.getParallelipidedDiagonal(1,2,3)); + assert.equal(tasks.getParallelipidedDiagonal(1,1,1), Math.sqrt(3)); + assert.equal(tasks.getParallelipidedDiagonal(3,3,3), Math.sqrt(27)); + //assert.equal(tasks.getParallelipidedDiagonal(1,2,3), Math.sqrt(14)); }); it.optional('roundToPowerOfTen should return an number rounded to specified power of 10', function() { - assert.equal(1234, tasks.roundToPowerOfTen(1234,0)); - assert.equal(1230, tasks.roundToPowerOfTen(1234,1)); - assert.equal(1200, tasks.roundToPowerOfTen(1234,2)); - assert.equal(1000, tasks.roundToPowerOfTen(1234,3)); + assert.equal(tasks.roundToPowerOfTen(1234,0), 1234); + assert.equal(tasks.roundToPowerOfTen(1234,1), 1230); + assert.equal(tasks.roundToPowerOfTen(1234,2), 1200); + assert.equal(tasks.roundToPowerOfTen(1234,3), 1000); - assert.equal(9678, tasks.roundToPowerOfTen(9678,0)); - assert.equal(9680, tasks.roundToPowerOfTen(9678,1)); - assert.equal(9700, tasks.roundToPowerOfTen(9678,2)); - assert.equal(10000, tasks.roundToPowerOfTen(9678,3)); + assert.equal(tasks.roundToPowerOfTen(9678,0), 9678); + assert.equal(tasks.roundToPowerOfTen(9678,1), 9680); + assert.equal(tasks.roundToPowerOfTen(9678,2), 9700); + assert.equal(tasks.roundToPowerOfTen(9678,3), 10000); }); it.optional('isPrime should return true if specified number is prime', function() { - assert.equal(true, tasks.isPrime(2), "2"); - assert.equal(true, tasks.isPrime(3), "3"); - assert.equal(false, tasks.isPrime(4), "4"); - assert.equal(true, tasks.isPrime(5), "5"); - assert.equal(false, tasks.isPrime(6), "6"); - assert.equal(true, tasks.isPrime(7), "7"); - assert.equal(false, tasks.isPrime(8), "8"); - assert.equal(false, tasks.isPrime(9), "9"); - assert.equal(false, tasks.isPrime(10), "10"); - assert.equal(true, tasks.isPrime(11), "11"); - assert.equal(false, tasks.isPrime(12), "12"); - assert.equal(true, tasks.isPrime(13), "13"); - assert.equal(true, tasks.isPrime(113), "113"); - assert.equal(false, tasks.isPrime(119), "119"); + assert.equal(tasks.isPrime(2), true, "2"); + assert.equal(tasks.isPrime(3), true, "3"); + assert.equal(tasks.isPrime(4), false, "4"); + assert.equal(tasks.isPrime(5), true, "5"); + assert.equal(tasks.isPrime(6), false, "6"); + assert.equal(tasks.isPrime(7), true, "7"); + assert.equal(tasks.isPrime(8), false, "8"); + assert.equal(tasks.isPrime(9), false, "9"); + assert.equal(tasks.isPrime(10), false, "10"); + assert.equal(tasks.isPrime(11), true, "11"); + assert.equal(tasks.isPrime(12), false, "12"); + assert.equal(tasks.isPrime(13), true, "13"); + assert.equal(tasks.isPrime(113), true, "113"); + assert.equal(tasks.isPrime(119), false, "119"); }); it.optional('toNumber should convert any value to number or return the default', function() { - assert.equal(0, tasks.toNumber(null, 0)); - assert.equal(0, tasks.toNumber('test', 0)); - assert.equal(1, tasks.toNumber('1', 0)); - assert.equal(42, tasks.toNumber(42, 0)); - assert.equal(42, tasks.toNumber(new Number(42), 0)); - assert.equal(-1, tasks.toNumber(undefined, -1)); + assert.equal(tasks.toNumber(null, 0), 0); + assert.equal(tasks.toNumber('test', 0), 0); + assert.equal(tasks.toNumber('1', 0), 1); + assert.equal(tasks.toNumber(42, 0), 42); + assert.equal(tasks.toNumber(new Number(42), 0), 42); + assert.equal(tasks.toNumber(undefined, -1), -1); }); }); diff --git a/test/03-date-tests.js b/test/03-date-tests.js index 62932f922..2493addba 100644 --- a/test/03-date-tests.js +++ b/test/03-date-tests.js @@ -8,31 +8,31 @@ describe('03-date-tasks', function() { it.optional('parseDataFromRfc2822 should parse rfc2822 string into a date value', function () { assert.equal( - new Date(1995, 11, 17, 3, 24, 0).valueOf(), - tasks.parseDataFromRfc2822('December 17, 1995 03:24:00').valueOf() + tasks.parseDataFromRfc2822('December 17, 1995 03:24:00').valueOf(), + new Date(1995, 11, 17, 3, 24, 0).valueOf() ); assert.equal( - 1453816082000, - tasks.parseDataFromRfc2822('Tue, 26 Jan 2016 13:48:02 GMT').valueOf() + tasks.parseDataFromRfc2822('Tue, 26 Jan 2016 13:48:02 GMT').valueOf(), + 1453816082000 ); assert.equal( - 895370400000, - tasks.parseDataFromRfc2822('Sun, 17 May 1998 03:00:00 GMT+0100').valueOf() + tasks.parseDataFromRfc2822('Sun, 17 May 1998 03:00:00 GMT+0100').valueOf(), + 895370400000 ); }); it.optional('parseDataFromIso8601 should parse ISO 8601 string into a date value', function () { assert.equal( - 1453219657000, - tasks.parseDataFromIso8601('2016-01-19T16:07:37+00:00').valueOf() + tasks.parseDataFromIso8601('2016-01-19T16:07:37+00:00').valueOf(), + 1453219657000 ); assert.equal( - 1453190857000, - tasks.parseDataFromIso8601('2016-01-19T08:07:37Z').valueOf() + tasks.parseDataFromIso8601('2016-01-19T08:07:37Z').valueOf(), + 1453190857000 ); }); @@ -90,8 +90,8 @@ describe('03-date-tasks', function() { } ].forEach(data => { assert.equal( - data.expected, - tasks.timeSpanToString(data.startDate, data.endDate) + tasks.timeSpanToString(data.startDate, data.endDate), + data.expected ); }); diff --git a/test/04-arrays-tests.js b/test/04-arrays-tests.js index eef6f904f..37e671a31 100644 --- a/test/04-arrays-tests.js +++ b/test/04-arrays-tests.js @@ -24,8 +24,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.findElement(data.arr, data.value); assert.equal( - data.expected, actual, + data.expected, `Index of '${data.value}' inside of [${data.arr}] = ${data.expected}, but actually ${actual}` ); }); @@ -49,8 +49,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - data.expected, - tasks.generateOdds(data.len) + tasks.generateOdds(data.len), + data.expected ); }); }); @@ -71,8 +71,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.doubleArray(data.arr); assert.deepEqual( - data.expected, actual, + data.expected, `The result of doubling [${data.arr}] is not correct` ); }); @@ -94,8 +94,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getArrayOfPositives(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -116,8 +116,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getArrayOfStrings(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -138,8 +138,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.removeFalsyValues(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -171,8 +171,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.findAllOccurences(data.arr, data.item); assert.equal( - data.expected, actual, + data.expected, `Number of occurences of ${JSON.stringify(data.item)} in ${JSON.stringify(data.arr)} is ${data.expected}, but actually ${actual})` ); }); @@ -191,8 +191,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getUpperCaseStrings(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -210,8 +210,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getStringsLength(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -233,8 +233,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { tasks.insertItem(data.arr, data.item, data.index); assert.deepEqual( - data.expected, - data.arr + data.arr, + data.expected ); }); }); @@ -253,8 +253,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - data.expected, - tasks.getHead(data.arr, data.n) + tasks.getHead(data.arr, data.n), + data.expected ); }); }); @@ -273,8 +273,8 @@ describe('04-arrays-tasks', function() { } ].forEach(data => { assert.deepEqual( - data.expected, - tasks.getTail(data.arr, data.n) + tasks.getTail(data.arr, data.n), + data.expected ); }); }); @@ -301,8 +301,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toCsvText(data.arr); assert.equal( - data.expected, - actual + actual, + data.expected ); }); }); @@ -320,8 +320,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toArrayOfSquares(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -345,8 +345,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getMovingSum(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -367,8 +367,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getSecondItems(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -395,8 +395,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.propagateItemsByPositionIndex(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -423,8 +423,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.get3TopItems(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -451,8 +451,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getPositivesCount(data.arr); assert.equal( - data.expected, actual, + data.expected, `Test failed for argument [${data.arr}]` ); }); @@ -483,8 +483,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.sortDigitNamesByNumericOrder(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -505,8 +505,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getItemsSum(data.arr); assert.deepEqual( - data.expected, actual, + data.expected, `Test failed for [${data.arr}]` ); }); @@ -531,8 +531,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getFalsyValuesCount(data.arr); assert.deepEqual( - data.expected, actual, + data.expected, `Test failed for [${data.arr}]` ); }); @@ -554,8 +554,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.toStringList(data.arr); assert.equal( - data.expected, - actual + actual, + data.expected ); }); }); @@ -630,8 +630,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.sortCitiesArray(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -657,8 +657,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getIdentityMatrix(data.n); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -693,8 +693,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getIntervalArray(data.start, data.end); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -718,8 +718,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.distinct(data.arr); assert.deepEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -765,8 +765,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.group(data.arr, data.keySelector, data.valueSelector); assert.deepEqual( - Array.from(data.expected), - Array.from(actual) + Array.from(actual), + Array.from(data.expected) ); }); }); @@ -790,8 +790,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.selectMany(data.arr, data.childrenSelector); assert.deepStrictEqual( - data.expected, - actual + actual, + data.expected ); }); }); @@ -815,8 +815,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.getElementByIndexes(data.arr, data.indexes); assert.equal( - data.expected, actual, + data.expected, `getElementByIndexes(${JSON.stringify(data.arr)}, ${JSON.stringify(data.indexes)}) returns an incorrect result. Expected ${data.expected}, but actual ${actual}` ); }); @@ -844,8 +844,8 @@ describe('04-arrays-tasks', function() { ].forEach(data => { var actual = tasks.swapHeadAndTail(Array.from(data.arr)); assert.deepEqual( - data.expected, actual, + data.expected, `The result of swaping head and tail [${data.arr}] is not correct` ); }); diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index 62005cfac..e11b41e26 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -221,8 +221,8 @@ describe('07-yield-tasks', function() { } assert.equal( - expected.length, lineNo, + expected.length, 'Lines count is incorrect:' ); }); diff --git a/test/12-katas-3-tests.js b/test/12-katas-3-tests.js index 732e6e207..f1f6c21be 100644 --- a/test/12-katas-3-tests.js +++ b/test/12-katas-3-tests.js @@ -124,8 +124,8 @@ describe('12-katas-3-tasks', function() { var encoded = urlShortener.encode(data); var actual = urlShortener.decode(encoded); assert.equal( - data, actual, + data, `urlShortener.encode for "${data}" returns "${encoded}" but decode returns "${actual}"` ); }); From 8da290d2469da2a5c5e221e89ed37989253b26e5 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Wed, 15 Jul 2020 23:00:46 +0300 Subject: [PATCH 19/23] tests fixes and eslint --- .eslintrc.js | 22 + package-lock.json | 2225 +++++++++++++++++++++++++ package.json | 16 +- test/01-strings-tests.js | 21 + test/02-numbers-tests.js | 17 + test/03-date-tests.js | 15 + test/04-arrays-tests.js | 17 +- test/05-regex-tests.js | 16 + test/06-conditions-n-loops-tests.js | 15 + test/07-yield-tests.js | 16 + test/08-objects-tests.js | 16 + test/09-functions-n-closures-tests.js | 16 + test/10-katas-1-tests.js | 16 + test/11-katas-2-tests.js | 15 + test/12-katas-3-tests.js | 15 + 15 files changed, 2452 insertions(+), 6 deletions(-) create mode 100644 .eslintrc.js create mode 100644 package-lock.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..d44aed196 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,22 @@ +module.exports = { + "env": { + "es2020": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 11 + }, + "rules": { + "require-yield": "off", + "no-unused-vars": "off", + "no-var": "error", + "no-lonely-if": "error", + "no-proto": "error", + "no-else-return": "error", + "eqeqeq": "error", + "no-lone-blocks": "error", + "no-cond-assign": "error", + "no-debugger": "error" + } +}; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..c87f25cb9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2225 @@ +{ + "name": "js-training", + "version": "0.9.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "acorn": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + } + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.3.0" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "es-get-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "dev": true, + "requires": { + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.4.0.tgz", + "integrity": "sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.0", + "eslint-utils": "^2.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", + "dev": true, + "requires": { + "acorn": "^7.2.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.2.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-all": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/glob-all/-/glob-all-3.2.1.tgz", + "integrity": "sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw==", + "dev": true, + "requires": { + "glob": "^7.1.2", + "yargs": "^15.3.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "inquirer": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.2.tgz", + "integrity": "sha512-DF4osh1FM6l0RJc5YWYhSDB6TawiBRlbV9Cox8MWlidU218Tb7fm3lQTULyUJDfJ0tjbzl0W4q651mrCCEM55w==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.16", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", + "dev": true + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dev": true, + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "mocha": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz", + "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==", + "dev": true, + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.3.1", + "debug": "3.2.6", + "diff": "4.0.2", + "escape-string-regexp": "1.0.5", + "find-up": "4.1.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "object.assign": "4.1.0", + "promise.allsettled": "1.0.2", + "serialize-javascript": "3.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.0", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + } + } + }, + "mocha-eslint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/mocha-eslint/-/mocha-eslint-6.0.0.tgz", + "integrity": "sha512-jUeQzQDWFZ/gIkax5Hw0nXugGccfMlWJFu6DQTl+WdX0ZqhlV7U4F01Lu8PmOz2yHQmepvRWgllIFbjYiicMkQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "eslint": "^6.6.0", + "glob-all": "^3.1.0", + "replaceall": "^0.1.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "dev": true, + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "readdirp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.7" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "replaceall": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/replaceall/-/replaceall-0.1.6.tgz", + "integrity": "sha1-gdgax663LX9cSUKt8ml6MiBojY4=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "rxjs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz", + "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + } + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } + } + } +} diff --git a/package.json b/package.json index 712b264fa..1830b3015 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,23 @@ "name": "js-training", "version": "0.9.1", "description": "JS training tasks", + "engines": { + "node": "^10.0.0" + }, "scripts": { "test": "./node_modules/.bin/mocha", - "test-debug": "./node_modules/.bin/mocha --debug-brk" + "test-debug": "./node_modules/.bin/mocha --debug", + "eslint-js": "eslint --config ./.eslintrc.js ./task/**/**.js" }, "author": "aorgish", "license": "MIT", "devDependencies": { - "mocha": "^2.3.4" + "eslint": "^7.4.0", + "mocha": "^8.0.1", + "mocha-eslint": "^6.0.0" }, - "repository" : { - "type" : "git", - "url" : "https://github.com/rolling-scopes-school/js-assignments.git" + "repository": { + "type": "git", + "url": "https://github.com/rolling-scopes-school/js-assignments.git" } } diff --git a/test/01-strings-tests.js b/test/01-strings-tests.js index 0b2793041..982d627fa 100644 --- a/test/01-strings-tests.js +++ b/test/01-strings-tests.js @@ -2,6 +2,7 @@ var assert = require('assert'); var tasks = require('../task/01-strings-tasks'); +var lint = require('mocha-eslint'); it.optional = require('../extensions/it-optional'); describe('01-strings-tasks', function() { @@ -125,4 +126,24 @@ describe('01-strings-tasks', function() { }); }); + + var paths = [ + 'task/01-strings-tasks.js' + ]; + + var options = { + // Specify style of output + formatter: 'compact', // Defaults to `stylish` + // Only display warnings if a test is failing + alwaysWarn: false, // Defaults to `true`, always show warnings + // Increase the timeout of the test if linting takes to long + timeout: 5000, // Defaults to the global mocha `timeout` option + // Increase the time until a test is marked as slow + slow: 1000, // Defaults to the global mocha `slow` option + // Consider linting warnings as errors and return failure + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/02-numbers-tests.js b/test/02-numbers-tests.js index bdcecbb73..a31ab4aed 100644 --- a/test/02-numbers-tests.js +++ b/test/02-numbers-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/02-numbers-tasks'); it.optional = require('../extensions/it-optional'); @@ -100,4 +101,20 @@ describe('02-numbers-tasks', function() { assert.equal(tasks.toNumber(new Number(42), 0), 42); assert.equal(tasks.toNumber(undefined, -1), -1); }); + + + var paths = [ + 'task/02-numbers-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/03-date-tests.js b/test/03-date-tests.js index 2493addba..c13d873fc 100644 --- a/test/03-date-tests.js +++ b/test/03-date-tests.js @@ -2,6 +2,7 @@ var assert = require('assert'); var tasks = require('../task/03-date-tasks'); +var lint = require('mocha-eslint'); it.optional = require('../extensions/it-optional'); describe('03-date-tasks', function() { @@ -137,4 +138,18 @@ describe('03-date-tasks', function() { }); }); + var paths = [ + 'task/03-date-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/04-arrays-tests.js b/test/04-arrays-tests.js index 37e671a31..f96304e34 100644 --- a/test/04-arrays-tests.js +++ b/test/04-arrays-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/04-arrays-tasks'); it.optional = require('../extensions/it-optional'); @@ -862,5 +863,19 @@ describe('04-arrays-tasks', function() { ); }); }); - + + var paths = [ + 'task/04-arrays-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/05-regex-tests.js b/test/05-regex-tests.js index 7e789f8a1..fbb0b7d16 100644 --- a/test/05-regex-tests.js +++ b/test/05-regex-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/05-regex-tasks'); it.optional = require('../extensions/it-optional'); @@ -158,4 +159,19 @@ describe('05-regex-tasks', function() { 'Password validator do not validate minLength restriction' ); }); + + var paths = [ + 'task/05-regex-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/06-conditions-n-loops-tests.js b/test/06-conditions-n-loops-tests.js index 4d9ffe701..9979505c1 100644 --- a/test/06-conditions-n-loops-tests.js +++ b/test/06-conditions-n-loops-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/06-conditions-n-loops-tasks'); it.optional = require('../extensions/it-optional'); @@ -742,4 +743,18 @@ describe('06-conditions-n-loops-tasks', function() { }); }); + var paths = [ + 'task/06-conditions-n-loops-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/07-yield-tests.js b/test/07-yield-tests.js index e11b41e26..ee8cfa024 100644 --- a/test/07-yield-tests.js +++ b/test/07-yield-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/07-yield-tasks'); it.optional = require('../extensions/it-optional'); @@ -505,4 +506,19 @@ describe('07-yield-tasks', function() { }); }); }); + + var paths = [ + 'task/07-yield-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/08-objects-tests.js b/test/08-objects-tests.js index 09366fa25..86070f569 100644 --- a/test/08-objects-tests.js +++ b/test/08-objects-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/08-objects-tasks'); it.optional = require('../extensions/it-optional'); @@ -267,4 +268,19 @@ describe('08-objects-tasks', function() { }); + var paths = [ + 'task/08-objects-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); + }); diff --git a/test/09-functions-n-closures-tests.js b/test/09-functions-n-closures-tests.js index 7b5a0dbf8..6c6d4f5a5 100644 --- a/test/09-functions-n-closures-tests.js +++ b/test/09-functions-n-closures-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/09-functions-n-closures-tasks'); it.optional = require('../extensions/it-optional'); @@ -188,4 +189,19 @@ describe('09-functions-n-closures-tasks', function() { } }); + var paths = [ + 'task/09-functions-n-closures-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); + }); diff --git a/test/10-katas-1-tests.js b/test/10-katas-1-tests.js index bf420882e..95bb9231e 100644 --- a/test/10-katas-1-tests.js +++ b/test/10-katas-1-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/10-katas-1-tasks'); it.optional = require('../extensions/it-optional'); @@ -224,4 +225,19 @@ describe('10-katas-1-tasks', function() { }); }); + var paths = [ + 'task/10-katas-1-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); + }); diff --git a/test/11-katas-2-tests.js b/test/11-katas-2-tests.js index f347a50e0..36e8994da 100644 --- a/test/11-katas-2-tests.js +++ b/test/11-katas-2-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/11-katas-2-tasks'); it.optional = require('../extensions/it-optional'); @@ -340,4 +341,18 @@ describe('11-katas-2-tasks', function() { }); }); + var paths = [ + 'task/11-katas-2-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); diff --git a/test/12-katas-3-tests.js b/test/12-katas-3-tests.js index f1f6c21be..6c1fd81ba 100644 --- a/test/12-katas-3-tests.js +++ b/test/12-katas-3-tests.js @@ -1,6 +1,7 @@ 'use strict'; var assert = require('assert'); +var lint = require('mocha-eslint'); var tasks = require('../task/12-katas-3-tasks'); it.optional = require('../extensions/it-optional'); @@ -131,4 +132,18 @@ describe('12-katas-3-tasks', function() { }); }); + var paths = [ + 'task/12-katas-3-tasks.js' + ]; + + var options = { + formatter: 'compact', // Defaults to `stylish` + alwaysWarn: false, // Defaults to `true`, always show warnings + timeout: 5000, // Defaults to the global mocha `timeout` option + slow: 1000, // Defaults to the global mocha `slow` option + strict: true, // Defaults to `false`, only notify the warnings + contextName: 'eslint', // Defaults to `eslint`, but can be any string + }; + + lint(paths, options); }); From 102f0dc39a8086841e9f8e2a9a9e9f973423928c Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Wed, 15 Jul 2020 23:04:09 +0300 Subject: [PATCH 20/23] readme updates --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79f9dff75..7036f25d7 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,14 @@ To start javascript assignments please follow the next steps: ### How to setup travis-ci * Open [https://travis-ci.org/](https://travis-ci.org/) and sign in with your github account. * Activate your forked repo **js-assignments**. -* Edit local README.md file and update all links (just replace all occurrences of `'rolling-scopes-school'` with your account name). +* Edit local README.md file and update all links (just replace all occurrences of `'AisBrestEDU' or 'rolling-scopes-school'` with your account name). * Commit and push updated README.md to github: ```bash git add README.md git commit -m "Update the links" git push origin master ``` -* Open https://github.com/rolling-scopes-school/js-assignments and test the build icon. Now it will run all tests and update status once you push changes to github. Keep this icon green! +* Open https://github.com/AisBrestEDU/js-assignments and test the build icon. Now it will run all tests and update status once you push changes to github. Keep this icon green! ### How to setup work environment @@ -73,7 +73,7 @@ and run the unit tests again. Find one test failed (red). Now it's time to fix i * Implement the function by any way and verify your solution by running tests until the failed test become passed (green). * Your solution work, but now time to refactor it. Try to make your code as pretty and simple as possible keeping up the test green. * Once you can't improve your code and tests are passed you can commit your solution. -* Push your updates to github server and check if tests passed on [travis-ci](https://travis-ci.org/rolling-scopes-school/js-assignments/builds). +* Push your updates to github server and check if tests passed on [travis-ci](https://travis-ci.org/AisBrestEDU/js-assignments/builds). * If everything is OK you can try to resolve the next task. ### How to debug tasks From 03add6ca56459cc8e159d90b43ba521294d929e9 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Wed, 15 Jul 2020 23:08:51 +0300 Subject: [PATCH 21/23] kata-10 eslint fix --- task/10-katas-1-tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task/10-katas-1-tasks.js b/task/10-katas-1-tasks.js index 5128b0695..75dd1535f 100644 --- a/task/10-katas-1-tasks.js +++ b/task/10-katas-1-tasks.js @@ -17,8 +17,8 @@ * ] */ function createCompassPoints() { + let sides = ['N','E','S','W']; // use array of cardinal directions only! throw new Error('Not implemented'); - var sides = ['N','E','S','W']; // use array of cardinal directions only! } From 0820949f92cb0bb46d1f195d23fec2820600133d Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Wed, 15 Jul 2020 23:16:50 +0300 Subject: [PATCH 22/23] eslint fix --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index d44aed196..827c7e080 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,7 @@ module.exports = { "rules": { "require-yield": "off", "no-unused-vars": "off", + "no-prototype-builtins": "off", "no-var": "error", "no-lonely-if": "error", "no-proto": "error", From 70a32aca54279d21dd74b122a8b960203876b705 Mon Sep 17 00:00:00 2001 From: Ilya Mokin Date: Wed, 15 Jul 2020 23:27:06 +0300 Subject: [PATCH 23/23] number task, test fix --- test/02-numbers-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/02-numbers-tests.js b/test/02-numbers-tests.js index a31ab4aed..cec6fd680 100644 --- a/test/02-numbers-tests.js +++ b/test/02-numbers-tests.js @@ -1,6 +1,6 @@ 'use strict'; -var assert = require('assert'); +var assert = require('assert').strict; var lint = require('mocha-eslint'); var tasks = require('../task/02-numbers-tasks'); it.optional = require('../extensions/it-optional');