Created
November 21, 2018 08:02
-
-
Save microsoftly/f6b1a4110d83844f186cb97d566660e7 to your computer and use it in GitHub Desktop.
test the implementation of the aww counter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { expect } from 'chai'; | |
import { getDogAndCatTitleCount } from './awwCounter'; | |
describe('Aww counter', () => { | |
it('Expects 2 cats and 5 dogs when selecting 20 titles', async () => { | |
const { cat, dog } = await getDogAndCatTitleCount(20); | |
expect(cat).to.be.equal(2) | |
expect(dog).to.be.equal(5); | |
}) | |
it('Expects 1 cat and 0 dogs when selecting 1 title', async () => { | |
const { cat, dog } = await getDogAndCatTitleCount(1); | |
expect(cat).to.be.equal(1) | |
expect(dog).to.be.equal(0); | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment