scrimba
21 web dev tips for 2021 🎇
Tip 4: Test Driven Programming
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Tip 4: Test Driven Programming
AboutCommentsNotes
Tip 4: Test Driven Programming
Expand for more info
main.js
run
preview
console
// Test Driven Programming

function addExclamation(str) {
// write code here
}



/**
* Test Suite
*/
describe('addExclamation()', () => {
it('adds an exclamation to the word', () => {
// arrange
const word = "Jump"

// act
const result = addExclamation(word)

// log
console.log("result: ", result)

// assert
expect(result).toBe("Jump!")
})
})
Console
›
"result: "
,
undefined
,
/index.html
-4:36