From 9dfd9f6ec211b7ccf04aa9814fca022af141aa8c Mon Sep 17 00:00:00 2001 From: moses ngige Date: Mon, 6 Jun 2022 22:06:19 +0300 Subject: [PATCH 1/2] Done. --- .results.json | 218 -------------------------------------------------- index.js | 6 +- 2 files changed, 5 insertions(+), 219 deletions(-) delete mode 100644 .results.json diff --git a/.results.json b/.results.json deleted file mode 100644 index 9366e1bd1..000000000 --- a/.results.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "stats": { - "suites": 5, - "tests": 10, - "passes": 0, - "pending": 0, - "failures": 10, - "start": "2021-01-26T15:53:19.476Z", - "end": "2021-01-26T15:53:20.212Z", - "duration": 736 - }, - "tests": [ - { - "title": "is defined", - "fullTitle": "index.js currentUser is defined", - "duration": 0, - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "pending": [], - "failures": [ - { - "title": "is defined", - "fullTitle": "index.js currentUser is defined", - "duration": 0, - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - }, - { - "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" - } - } - ], - "passes": [] -} \ No newline at end of file diff --git a/index.js b/index.js index 96427a583..43e5c6a4a 100644 --- a/index.js +++ b/index.js @@ -1 +1,5 @@ -// Write your code in this file! +const currentUser = 'Grace Hopper'; + +const welcomeMessage = `Welcome to Flatbook, ${currentUser}!`; +const excitedWelcomeMessage = welcomeMessage.toUpperCase(); +const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`; \ No newline at end of file From c8770eeffacff55f8063829c66178eeb55d8639f Mon Sep 17 00:00:00 2001 From: moses ngige Date: Tue, 7 Jun 2022 08:26:04 +0300 Subject: [PATCH 2/2] commit tree 2b5df8c77be15cfd7cb5ddd29666d1e5a44c43db --- .results.json | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 .results.json diff --git a/.results.json b/.results.json new file mode 100644 index 000000000..b8377d673 --- /dev/null +++ b/.results.json @@ -0,0 +1,158 @@ +{ + "stats": { + "suites": 5, + "tests": 10, + "passes": 10, + "pending": 0, + "failures": 0, + "start": "2022-06-07T05:26:01.532Z", + "end": "2022-06-07T05:26:02.356Z", + "duration": 824 + }, + "tests": [ + { + "title": "is defined", + "fullTitle": "index.js currentUser is defined", + "duration": 2, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains \"Welcome to Flatbook, \"", + "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", + "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": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "ends with an exclamation point!", + "fullTitle": "index.js welcomeMessage ends with an exclamation point!", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains \"WELCOME TO FLATBOOK, \"", + "fullTitle": "index.js excitedWelcomeMessage contains \"WELCOME TO FLATBOOK, \"", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains the value of the 'currentUser' variable", + "fullTitle": "index.js excitedWelcomeMessage contains the value of the 'currentUser' variable", + "duration": 1, + "currentRetry": 0, + "err": {} + }, + { + "title": "ends with an exclamation point", + "fullTitle": "index.js excitedWelcomeMessage ends with an exclamation point", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains \"Welcome, \"", + "fullTitle": "index.js shortGreeting contains \"Welcome, \"", + "duration": 0, + "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": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "ends with an exclamation point", + "fullTitle": "index.js shortGreeting ends with an exclamation point", + "duration": 0, + "currentRetry": 0, + "err": {} + } + ], + "pending": [], + "failures": [], + "passes": [ + { + "title": "is defined", + "fullTitle": "index.js currentUser is defined", + "duration": 2, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains \"Welcome to Flatbook, \"", + "fullTitle": "index.js welcomeMessage contains \"Welcome to Flatbook, \"", + "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": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "ends with an exclamation point!", + "fullTitle": "index.js welcomeMessage ends with an exclamation point!", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains \"WELCOME TO FLATBOOK, \"", + "fullTitle": "index.js excitedWelcomeMessage contains \"WELCOME TO FLATBOOK, \"", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains the value of the 'currentUser' variable", + "fullTitle": "index.js excitedWelcomeMessage contains the value of the 'currentUser' variable", + "duration": 1, + "currentRetry": 0, + "err": {} + }, + { + "title": "ends with an exclamation point", + "fullTitle": "index.js excitedWelcomeMessage ends with an exclamation point", + "duration": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "contains \"Welcome, \"", + "fullTitle": "index.js shortGreeting contains \"Welcome, \"", + "duration": 0, + "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": 0, + "currentRetry": 0, + "err": {} + }, + { + "title": "ends with an exclamation point", + "fullTitle": "index.js shortGreeting ends with an exclamation point", + "duration": 0, + "currentRetry": 0, + "err": {} + } + ] +} \ No newline at end of file