scrimba
Unit Testing
Spy 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

AboutCommentsNotes
Spy Challenge 🕵️
Expand for more info
main.js
run
preview
console
/*  Unit Testing: Spies Challenge
*
* 1. Use a spy and test the method getCodeName() fully
* 2. You will need to use spyOn and toHaveBeenCalledWith()
* 3. HINT: you will need to chain the spy
* example: spyOn(object, 'key').and.returnValue(value)
*/

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

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

describe('get code name', () => {

});
});
Console
/index.html
-6:09