From bdd535bb04f2a243778a7ad3d02f1640e0189e69 Mon Sep 17 00:00:00 2001 From: joseph mwanzia Date: Fri, 25 Nov 2022 01:50:15 +0300 Subject: [PATCH 1/4] Strings Labs --- .results.json | 128 ++++++++++++++------------------------------------ index.js | 6 +++ 2 files changed, 40 insertions(+), 94 deletions(-) diff --git a/.results.json b/.results.json index 9366e1bd1..5fba0efbe 100644 --- a/.results.json +++ b/.results.json @@ -2,217 +2,157 @@ "stats": { "suites": 5, "tests": 10, - "passes": 0, + "passes": 10, "pending": 0, - "failures": 10, - "start": "2021-01-26T15:53:19.476Z", - "end": "2021-01-26T15:53:20.212Z", - "duration": 736 + "failures": 0, + "start": "2022-11-24T22:33:54.449Z", + "end": "2022-11-24T22:33:54.826Z", + "duration": 377 }, "tests": [ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 0, + "duration": 2, "currentRetry": 0, - "err": { - "stack": "ReferenceError: currentUser is not defined\n at Context. (test/indexTest.js:4:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "currentUser is not defined" - } + "err": {} }, { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 0, + "duration": 1, "currentRetry": 0, - "err": { - "stack": "ReferenceError: welcomeMessage is not defined\n at Context. (test/indexTest.js:11:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "welcomeMessage is not defined" - } + "err": {} }, { "title": "contains the value of the 'currentUser' variable", "fullTitle": "index.js welcomeMessage contains the value of the 'currentUser' variable", - "duration": 0, + "duration": 1, "currentRetry": 0, - "err": { - "stack": "ReferenceError: welcomeMessage is not defined\n at Context. (test/indexTest.js:15:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "welcomeMessage is not defined" - } + "err": {} }, { "title": "ends with an exclamation point!", "fullTitle": "index.js welcomeMessage ends with an exclamation point!", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: welcomeMessage is not defined\n at Context. (test/indexTest.js:19:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "welcomeMessage is not defined" - } + "err": {} }, { "title": "contains \"WELCOME TO FLATBOOK, \"", "fullTitle": "index.js excitedWelcomeMessage contains \"WELCOME TO FLATBOOK, \"", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: excitedWelcomeMessage is not defined\n at Context. (test/indexTest.js:25:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "excitedWelcomeMessage is not defined" - } + "err": {} }, { "title": "contains the value of the 'currentUser' variable", "fullTitle": "index.js excitedWelcomeMessage contains the value of the 'currentUser' variable", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: currentUser is not defined\n at Context. (test/indexTest.js:29:36)\n at processImmediate (internal/timers.js:461:21)", - "message": "currentUser is not defined" - } + "err": {} }, { "title": "ends with an exclamation point", "fullTitle": "index.js excitedWelcomeMessage ends with an exclamation point", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: excitedWelcomeMessage is not defined\n at Context. (test/indexTest.js:35:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "excitedWelcomeMessage is not defined" - } + "err": {} }, { "title": "contains \"Welcome, \"", "fullTitle": "index.js shortGreeting contains \"Welcome, \"", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: shortGreeting is not defined\n at Context. (test/indexTest.js:41:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "shortGreeting is not defined" - } + "err": {} }, { "title": "contains the first initial of the name stored in the 'currentUser' variable", "fullTitle": "index.js shortGreeting contains the first initial of the name stored in the 'currentUser' variable", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: currentUser is not defined\n at Context. (test/indexTest.js:45:28)\n at processImmediate (internal/timers.js:461:21)", - "message": "currentUser is not defined" - } + "err": {} }, { "title": "ends with an exclamation point", "fullTitle": "index.js shortGreeting ends with an exclamation point", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: shortGreeting is not defined\n at Context. (test/indexTest.js:53:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "shortGreeting is not defined" - } + "err": {} } ], "pending": [], - "failures": [ + "failures": [], + "passes": [ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 0, + "duration": 2, "currentRetry": 0, - "err": { - "stack": "ReferenceError: currentUser is not defined\n at Context. (test/indexTest.js:4:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "currentUser is not defined" - } + "err": {} }, { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 0, + "duration": 1, "currentRetry": 0, - "err": { - "stack": "ReferenceError: welcomeMessage is not defined\n at Context. (test/indexTest.js:11:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "welcomeMessage is not defined" - } + "err": {} }, { "title": "contains the value of the 'currentUser' variable", "fullTitle": "index.js welcomeMessage contains the value of the 'currentUser' variable", - "duration": 0, + "duration": 1, "currentRetry": 0, - "err": { - "stack": "ReferenceError: welcomeMessage is not defined\n at Context. (test/indexTest.js:15:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "welcomeMessage is not defined" - } + "err": {} }, { "title": "ends with an exclamation point!", "fullTitle": "index.js welcomeMessage ends with an exclamation point!", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: welcomeMessage is not defined\n at Context. (test/indexTest.js:19:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "welcomeMessage is not defined" - } + "err": {} }, { "title": "contains \"WELCOME TO FLATBOOK, \"", "fullTitle": "index.js excitedWelcomeMessage contains \"WELCOME TO FLATBOOK, \"", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: excitedWelcomeMessage is not defined\n at Context. (test/indexTest.js:25:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "excitedWelcomeMessage is not defined" - } + "err": {} }, { "title": "contains the value of the 'currentUser' variable", "fullTitle": "index.js excitedWelcomeMessage contains the value of the 'currentUser' variable", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: currentUser is not defined\n at Context. (test/indexTest.js:29:36)\n at processImmediate (internal/timers.js:461:21)", - "message": "currentUser is not defined" - } + "err": {} }, { "title": "ends with an exclamation point", "fullTitle": "index.js excitedWelcomeMessage ends with an exclamation point", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: excitedWelcomeMessage is not defined\n at Context. (test/indexTest.js:35:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "excitedWelcomeMessage is not defined" - } + "err": {} }, { "title": "contains \"Welcome, \"", "fullTitle": "index.js shortGreeting contains \"Welcome, \"", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: shortGreeting is not defined\n at Context. (test/indexTest.js:41:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "shortGreeting is not defined" - } + "err": {} }, { "title": "contains the first initial of the name stored in the 'currentUser' variable", "fullTitle": "index.js shortGreeting contains the first initial of the name stored in the 'currentUser' variable", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: currentUser is not defined\n at Context. (test/indexTest.js:45:28)\n at processImmediate (internal/timers.js:461:21)", - "message": "currentUser is not defined" - } + "err": {} }, { "title": "ends with an exclamation point", "fullTitle": "index.js shortGreeting ends with an exclamation point", "duration": 0, "currentRetry": 0, - "err": { - "stack": "ReferenceError: shortGreeting is not defined\n at Context. (test/indexTest.js:53:14)\n at processImmediate (internal/timers.js:461:21)", - "message": "shortGreeting is not defined" - } + "err": {} } - ], - "passes": [] + ] } \ No newline at end of file diff --git a/index.js b/index.js index 96427a583..f73897749 100644 --- a/index.js +++ b/index.js @@ -1 +1,7 @@ // Write your code in this file! +const currentUser = 'Grace Hooper'; +const welcomeMessage = `Welcome to Flatbook, ${currentUser}!`; +const excitedWelcomeMessage = welcomeMessage.toUpperCase(); +const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`; + + From bf422806d9b675240d6d5fda932149681da12777 Mon Sep 17 00:00:00 2001 From: joseph mwanzia Date: Fri, 2 Dec 2022 13:50:25 +0300 Subject: [PATCH 2/4] strings labs --- .results.json | 14 +++++++------- index.js | 4 +--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.results.json b/.results.json index 5fba0efbe..d6e261451 100644 --- a/.results.json +++ b/.results.json @@ -5,22 +5,22 @@ "passes": 10, "pending": 0, "failures": 0, - "start": "2022-11-24T22:33:54.449Z", - "end": "2022-11-24T22:33:54.826Z", - "duration": 377 + "start": "2022-12-02T10:44:07.789Z", + "end": "2022-12-02T10:44:08.209Z", + "duration": 420 }, "tests": [ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 2, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, @@ -87,14 +87,14 @@ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 2, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, diff --git a/index.js b/index.js index f73897749..a0585dbbb 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,4 @@ const currentUser = 'Grace Hooper'; const welcomeMessage = `Welcome to Flatbook, ${currentUser}!`; const excitedWelcomeMessage = welcomeMessage.toUpperCase(); -const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`; - - +const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`; \ No newline at end of file From d932a2bca7098135d54f9cc41e7c03db2b6af472 Mon Sep 17 00:00:00 2001 From: joseph mwanzia Date: Tue, 6 Dec 2022 03:21:34 +0300 Subject: [PATCH 3/4] completed review of strings --- .results.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.results.json b/.results.json index d6e261451..a50800534 100644 --- a/.results.json +++ b/.results.json @@ -5,29 +5,29 @@ "passes": 10, "pending": 0, "failures": 0, - "start": "2022-12-02T10:44:07.789Z", - "end": "2022-12-02T10:44:08.209Z", - "duration": 420 + "start": "2022-12-06T00:19:48.521Z", + "end": "2022-12-06T00:19:48.902Z", + "duration": 381 }, "tests": [ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 2, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "contains the value of the 'currentUser' variable", "fullTitle": "index.js welcomeMessage contains the value of the 'currentUser' variable", - "duration": 1, + "duration": 0, "currentRetry": 0, "err": {} }, @@ -69,7 +69,7 @@ { "title": "contains the first initial of the name stored in the 'currentUser' variable", "fullTitle": "index.js shortGreeting contains the first initial of the name stored in the 'currentUser' variable", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, @@ -87,21 +87,21 @@ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 2, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "contains the value of the 'currentUser' variable", "fullTitle": "index.js welcomeMessage contains the value of the 'currentUser' variable", - "duration": 1, + "duration": 0, "currentRetry": 0, "err": {} }, @@ -143,7 +143,7 @@ { "title": "contains the first initial of the name stored in the 'currentUser' variable", "fullTitle": "index.js shortGreeting contains the first initial of the name stored in the 'currentUser' variable", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, From 2f0c5b53375ee5bd7998b473227ff3b9cd4acf9d Mon Sep 17 00:00:00 2001 From: joseph mwanzia Date: Tue, 6 Dec 2022 12:35:15 +0300 Subject: [PATCH 4/4] completed review strings lab --- .results.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.results.json b/.results.json index a50800534..107eaead8 100644 --- a/.results.json +++ b/.results.json @@ -5,9 +5,9 @@ "passes": 10, "pending": 0, "failures": 0, - "start": "2022-12-06T00:19:48.521Z", - "end": "2022-12-06T00:19:48.902Z", - "duration": 381 + "start": "2022-12-06T00:30:36.425Z", + "end": "2022-12-06T00:30:36.810Z", + "duration": 385 }, "tests": [ { @@ -20,7 +20,7 @@ { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, @@ -34,7 +34,7 @@ { "title": "ends with an exclamation point!", "fullTitle": "index.js welcomeMessage ends with an exclamation point!", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, @@ -62,14 +62,14 @@ { "title": "contains \"Welcome, \"", "fullTitle": "index.js shortGreeting contains \"Welcome, \"", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "contains the first initial of the name stored in the 'currentUser' variable", "fullTitle": "index.js shortGreeting contains the first initial of the name stored in the 'currentUser' variable", - "duration": 1, + "duration": 0, "currentRetry": 0, "err": {} }, @@ -94,7 +94,7 @@ { "title": "contains \"Welcome to Flatbook, \"", "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", - "duration": 1, + "duration": 2, "currentRetry": 0, "err": {} }, @@ -108,7 +108,7 @@ { "title": "ends with an exclamation point!", "fullTitle": "index.js welcomeMessage ends with an exclamation point!", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, @@ -136,14 +136,14 @@ { "title": "contains \"Welcome, \"", "fullTitle": "index.js shortGreeting contains \"Welcome, \"", - "duration": 0, + "duration": 1, "currentRetry": 0, "err": {} }, { "title": "contains the first initial of the name stored in the 'currentUser' variable", "fullTitle": "index.js shortGreeting contains the first initial of the name stored in the 'currentUser' variable", - "duration": 1, + "duration": 0, "currentRetry": 0, "err": {} },