Skip to content

Instantly share code, notes, and snippets.

@mlevkovsky
Last active February 27, 2020 16:50
Show Gist options
  • Save mlevkovsky/f9279ee82de89ff364aa21bcbf4fe249 to your computer and use it in GitHub Desktop.
Save mlevkovsky/f9279ee82de89ff364aa21bcbf4fe249 to your computer and use it in GitHub Desktop.
export class Calculator() {
public add(firstAddend: number, secondAddend: number): number {
return firstAddend + secondAddend;
}
}
// ✅test passes, we're all happy
describe('Calculator', () => {
it('sums up two numbers properly', () => {
calculator = new Calculator();
expect(calculator.add(2,2)).to.equal(4);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment