From bd0a6174f3912bdc2cb304ed0dcdf657bfa8b718 Mon Sep 17 00:00:00 2001 From: CorneliusKibetDC Date: Thu, 26 Sep 2024 11:47:03 +0300 Subject: [PATCH] complete lab --- .results.json | 120 +++++++++++++------------------------------------- index.js | 5 ++- 2 files changed, 34 insertions(+), 91 deletions(-) diff --git a/.results.json b/.results.json index 9366e1bd1..77b21dd31 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": "2024-09-26T08:46:25.860Z", + "end": "2024-09-26T08:46:26.191Z", + "duration": 331 }, "tests": [ { "title": "is defined", "fullTitle": "index.js currentUser is defined", - "duration": 0, + "duration": 1, "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, "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, "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": 1, "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, "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, "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..ac514d9b8 100644 --- a/index.js +++ b/index.js @@ -1 +1,4 @@ -// Write your code in this file! +const currentUser='Wizzerd2Ways'; +const welcomeMessage = `Welcome to Flatbook, ${currentUser}!`; +const excitedWelcomeMessage = welcomeMessage.toUpperCase(); +const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`; \ No newline at end of file