scrimba
Unit Testing
Final Challenge
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

To see this lesson you need to be logged in. Joining Scrimba is free and gives you access to 20+ courses.Sign up
AboutCommentsNotes
Final Challenge
Expand for more info
main.js
run
preview
console
/* Unit Testing: Final Challenge
*
* 1. Add to One of Your Existing Projects
* 2. My GitHub repo to write tests for simple methods
* - https://github.com/PizzaPokerGuy/100AlgorithmsChallenge
*/

// Test Suite
describe(`${User.name} Class`, () => {
let model;

beforeEach(() => {
model = new User();
});

describe('additional matchers testing area', () => {
it('has my first name', () => {
// arrange
const firstName = 'Dylan';
const lastName = 'Israel';

// act
model = new User({firstName, lastName});

// assert
expect(model.fullName).toMatch(/Dylan/);
});
});
});
Console
/index.html
-1:50