Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Alexandre Alencar aalencar

🏠
Working from home
View GitHub Profile
@aalencar
aalencar / person.spec.ts
Created Mar 17, 2020
Example on how to better organize your test using Jest
View person.spec.ts
describe('Person', () => {
describe('#setName', () => {
it('should set name when name is passed', () => {
const person = new Person();
const name = 'Alex';
person.setName(name);
expect(person.name).toBe(name);
});