Skip to content

Instantly share code, notes, and snippets.

@DmitryEfimenko
Last active February 14, 2023 06:24
Show Gist options
  • Select an option

  • Save DmitryEfimenko/b3786792c8280bdafbed73819a94d19e to your computer and use it in GitHub Desktop.

Select an option

Save DmitryEfimenko/b3786792c8280bdafbed73819a94d19e to your computer and use it in GitHub Desktop.
describe('CatService', () => {
let classUnderTest: CatService;
beforeAll(() => {
classUnderTest = new CatService();
});
it('returns undefined for an unknown cat breed', () => {
const result = classUnderTest.getBreed('Maine Coon');
expect(result).toBeUndefined();
});
it('suceeds to provide a known cat breed', () => {
classUnderTest.addKnownBreed('Maine Coon');
const result = classUnderTest.getBreed('Maine Coon');
expect(result).toBeDefined();
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment