Update person.test.js
This commit is contained in:
@@ -2,11 +2,12 @@ import { describe, it, expect } from 'vitest';
|
|||||||
import { Person } from './person.js';
|
import { Person } from './person.js';
|
||||||
|
|
||||||
// Remove the `todo` from the `describe` to run the tests.
|
// Remove the `todo` from the `describe` to run the tests.
|
||||||
describe.todo('Person', () => {
|
describe('Person', () => {
|
||||||
// This test will fail. Why?
|
// This test will fail. Why?
|
||||||
it('should create a person with a first name and last name', () => {
|
it('should create a person with a first name and last name', () => {
|
||||||
const person = new Person('Grace', 'Hopper');
|
const person = new Person('Grace', 'Hopper');
|
||||||
expect(person).toEqual({
|
expect(person).toEqual({
|
||||||
|
id: expect.stringContaining('person-'),
|
||||||
firstName: 'Grace',
|
firstName: 'Grace',
|
||||||
lastName: 'Hopper',
|
lastName: 'Hopper',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user