From 5bd7b5ffb7f6c30aa10f5945d4bc1dacd2d6ffaa Mon Sep 17 00:00:00 2001 From: bellord13 Date: Mon, 22 Nov 2021 19:06:53 +0300 Subject: [PATCH] fix --- assets/loggerService/loggerService.js | 6 +-- tests/index.php | 77 +++++++++++++++++---------- tests/kit.CollectionTest.php | 24 +++------ 3 files changed, 58 insertions(+), 49 deletions(-) diff --git a/assets/loggerService/loggerService.js b/assets/loggerService/loggerService.js index 9fabe71..c2a9188 100644 --- a/assets/loggerService/loggerService.js +++ b/assets/loggerService/loggerService.js @@ -5,9 +5,9 @@ __PluginManager__.register('loggerService', function(module, exports, require, g var Logger = require('Logger'); var lightMap = [ - {class: '', keys: []}, - {class: 'text-danger', keys: []}, - {class: 'text-secondary', keys: []}, + {class: 'kit-logger-row--success', keys: ['pass', 'success']}, + {class: 'kit-logger-row--warning', keys: ['warn', 'warning']}, + {class: 'kit-logger-row--error', keys: ['fail', 'error', 'errors']}, ]; var getLightClass = function(key) { key = ''+key; diff --git a/tests/index.php b/tests/index.php index 8492fbb..85efef7 100644 --- a/tests/index.php +++ b/tests/index.php @@ -4,7 +4,7 @@
$clName"; ?> -
- +
+
+
-
-
-
\ No newline at end of file + \ No newline at end of file diff --git a/tests/kit.CollectionTest.php b/tests/kit.CollectionTest.php index 4a62791..5acba81 100644 --- a/tests/kit.CollectionTest.php +++ b/tests/kit.CollectionTest.php @@ -26,29 +26,21 @@ kit.ready(['collection', 'testing', 'flexKit'], function () { var unit = new kit.testing.Unit(); unit.logger.info('Коллекции by php collection: Array ( [10] => 10 [1] => 1 )'); - unit.logger.notice(' '); - unit.logger.info('ARRAY'); - unit.logger.notice(' '); var assertSame = unit.assertSame.bind(unit); var arr = []; arr[10] = 100; var collection = new kit.Collection(arr); - assertSame(1, collection.count(), 'Количество'); - assertSame(true, collection.has(10), 'has (int) 10'); - assertSame(true, collection.has('10'), 'has 10'); - assertSame(false, collection.has('5'), 'has 5'); - assertSame(2, collection.get(3, 2), 'get'); - assertSame(100, collection.get(10, 2), 'get'); - assertSame(undefined, collection.get(11), 'get'); + assertSame(1, collection.count(), 'type array: Количество'); + assertSame(true, collection.has(10), 'type array: has (int) 10'); + assertSame(true, collection.has('10'), 'type array: has 10'); + assertSame(false, collection.has('5'), 'type array: has 5'); + assertSame(2, collection.get(3, 2), 'type array: get'); + assertSame(100, collection.get(10, 2), 'type array: get'); + assertSame(undefined, collection.get(11), 'type array: get'); - - unit.logger.info(' '); - unit.logger.info('Object'); - unit.logger.info(' '); - var ob = { a: 1, b: 2, @@ -232,8 +224,6 @@ kit.ready(['collection', 'testing', 'flexKit'], function () { y = x.pluck('age'); assertSame('20-19-18', y.toArray().join('-'), 'pluck с проверкой сохранения порядка'); - - assertSame('10', 20, 'Спец ошибка'); });