Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 34 additions & 94 deletions .results.json
Original file line number Diff line number Diff line change
Expand Up @@ -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-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": 0,
"duration": 2,
"currentRetry": 0,
"err": {
"stack": "ReferenceError: currentUser is not defined\n at Context.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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,
"duration": 1,
"currentRetry": 0,
"err": {
"stack": "ReferenceError: currentUser is not defined\n at Context.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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,
"duration": 1,
"currentRetry": 0,
"err": {
"stack": "ReferenceError: currentUser is not defined\n at Context.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (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.<anonymous> (test/indexTest.js:53:14)\n at processImmediate (internal/timers.js:461:21)",
"message": "shortGreeting is not defined"
}
"err": {}
}
],
"passes": []
]
}
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -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)}!`;