Skip to content

Instantly share code, notes, and snippets.

@jtenner
Last active May 22, 2019 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtenner/50a5fa1a4f014f23d3227787edbbc8b1 to your computer and use it in GitHub Desktop.
Save jtenner/50a5fa1a4f014f23d3227787edbbc8b1 to your computer and use it in GitHub Desktop.
let myFoo = new Foo();
describe("Foo.divide()", (): void => {
it("should throw when dividing by zero", (): void => {
expectFn((): void => { myFoo.divide(42, 0); })
.toThrow("Dividing by zero should throw an error.");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment