From 3883bc1501c05fee33d396491f0f5070bfcf3731 Mon Sep 17 00:00:00 2001 From: Nestamageto Date: Tue, 2 Jul 2024 05:38:13 +0300 Subject: [PATCH 1/2] complete lab --- .results.json | 102 ++++++++++++++++++++++++++++++++++++++++++++++ index.js | 3 ++ test/indexTest.js | 1 + 3 files changed, 106 insertions(+) create mode 100644 .results.json diff --git a/.results.json b/.results.json new file mode 100644 index 000000000..a3dd0b659 --- /dev/null +++ b/.results.json @@ -0,0 +1,102 @@ +{ + "stats": { + "suites": 4, + "tests": 6, + "passes": 6, + "pending": 0, + "failures": 0, + "start": "2024-07-02T02:35:12.545Z", + "end": "2024-07-02T02:35:13.211Z", + "duration": 666 + }, + "tests": [ + { + "title": "is set as Scuber", + "fullTitle": "index.js companyName is set as Scuber", + "duration": 1, + "currentRetry": 0, + "err": {} + }, + { + "title": "is defined as a const", + "fullTitle": "index.js companyName is defined as a const", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "is declared as equal to Chelsea", + "fullTitle": "index.js mostProfitableNeighborhood is declared as equal to Chelsea", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "is defined using let", + "fullTitle": "index.js mostProfitableNeighborhood is defined using let", + "duration": 1, + "currentRetry": 0, + "err": {} + }, + { + "title": "is declared as equal to Susan Smith", + "fullTitle": "index.js companyCeo is declared as equal to Susan Smith", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "is defined using let", + "fullTitle": "index.js companyCeo is defined using let", + "duration": 0, + "currentRetry": 0, + "err": {} + } + ], + "pending": [], + "failures": [], + "passes": [ + { + "title": "is set as Scuber", + "fullTitle": "index.js companyName is set as Scuber", + "duration": 1, + "currentRetry": 0, + "err": {} + }, + { + "title": "is defined as a const", + "fullTitle": "index.js companyName is defined as a const", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "is declared as equal to Chelsea", + "fullTitle": "index.js mostProfitableNeighborhood is declared as equal to Chelsea", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "is defined using let", + "fullTitle": "index.js mostProfitableNeighborhood is defined using let", + "duration": 1, + "currentRetry": 0, + "err": {} + }, + { + "title": "is declared as equal to Susan Smith", + "fullTitle": "index.js companyCeo is declared as equal to Susan Smith", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "is defined using let", + "fullTitle": "index.js companyCeo is defined using let", + "duration": 0, + "currentRetry": 0, + "err": {} + } + ] +} \ No newline at end of file diff --git a/index.js b/index.js index 0db694916..06b91e1d1 100644 --- a/index.js +++ b/index.js @@ -1 +1,4 @@ // Code your solution in this file! +const companyName = 'Scuber'; +let mostProfitableNeighborhood = 'Chelsea'; +let companyCeo = 'Susan Smith' diff --git a/test/indexTest.js b/test/indexTest.js index 8bd71d86e..0e05faac9 100644 --- a/test/indexTest.js +++ b/test/indexTest.js @@ -2,6 +2,7 @@ require ( './helpers.js' ); const fs = require('fs') const path = require('path') +const { expect } = require('chai') const js = fs.readFileSync(path.resolve(__dirname, '..', 'index.js'), 'utf-8') From 3b6d8e431f935be3abc082376cd0e0eea2eebd81 Mon Sep 17 00:00:00 2001 From: Nestamageto Date: Sat, 13 Jul 2024 16:11:13 +0300 Subject: [PATCH 2/2] complete lab --- .results.json | 18 +++++++++--------- index.js | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.results.json b/.results.json index a3dd0b659..e2f7b18f6 100644 --- a/.results.json +++ b/.results.json @@ -5,9 +5,9 @@ "passes": 6, "pending": 0, "failures": 0, - "start": "2024-07-02T02:35:12.545Z", - "end": "2024-07-02T02:35:13.211Z", - "duration": 666 + "start": "2024-07-13T13:03:28.153Z", + "end": "2024-07-13T13:03:28.646Z", + "duration": 493 }, "tests": [ { @@ -34,21 +34,21 @@ { "title": "is defined using let", "fullTitle": "index.js mostProfitableNeighborhood is defined using let", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, { "title": "is declared as equal to Susan Smith", "fullTitle": "index.js companyCeo is declared as equal to Susan Smith", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "is defined using let", "fullTitle": "index.js companyCeo is defined using let", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} } @@ -80,21 +80,21 @@ { "title": "is defined using let", "fullTitle": "index.js mostProfitableNeighborhood is defined using let", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, { "title": "is declared as equal to Susan Smith", "fullTitle": "index.js companyCeo is declared as equal to Susan Smith", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "is defined using let", "fullTitle": "index.js companyCeo is defined using let", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} } diff --git a/index.js b/index.js index 06b91e1d1..7f89ff77e 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ // Code your solution in this file! const companyName = 'Scuber'; let mostProfitableNeighborhood = 'Chelsea'; -let companyCeo = 'Susan Smith' +let companyCeo = 'Susan Smith';