To begin testing the mock API service, let's create a new services folder and add a mockSpeakerService.spec.js file.
Inside that file, we need to import our assertion library, create our initial describe, and write an existence test.
import { expect } from 'chai'; describe('Mock Speaker Service', () => { it('exits', () => { expect(MockSpeakerService).to.exist; });});
Start the npm test script with watch. The test we just wrote should fail. To make the test pass, we must create a MockSpeakerService object. Let's play devil's advocate a little and create an object in this file, but only enough of an object to make the test pass.
let MockSpeakerService = {};
This line passes the currently failing test, but clearly isn't what ...