Skip to content

Instantly share code, notes, and snippets.

@LastTalon
Last active January 12, 2024 18:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LastTalon/7a87349199e93d48d751fe2a4ae72a73 to your computer and use it in GitHub Desktop.
Save LastTalon/7a87349199e93d48d751fe2a4ae72a73 to your computer and use it in GitHub Desktop.
TestEZ Definitions
type Expectation = {
to: Expectation,
be: Expectation,
been: Expectation,
have: Expectation,
was: Expectation,
at: Expectation,
never: Expectation,
a: (typeName: string) -> Expectation,
ok: () -> Expectation,
equal: (otherValue: any) -> Expectation,
near: (otherValue: number, limit: number?) -> Expectation,
throw: (messageSubstring: string?) -> Expectation,
}
declare function FIXME(optionalMessage: string?)
declare function FOCUS()
declare function SKIP()
declare function afterAll(callback: () -> ())
declare function afterEach(callback: () -> ())
declare function beforeAll(callback: () -> ())
declare function beforeEach(callback: () -> ())
declare function describe(phrase: string, callback: () -> ())
declare function describeFOCUS(phrase: string, callback: () -> ())
declare function describeSKIP(phrase: string, callback: () -> ())
declare function fdescribe(phrase: string, callback: () -> ())
declare function xdescribe(phrase: string, callback: () -> ())
declare function expect(value: any): Expectation
declare function it(phrase: string, callback: () -> ())
declare function itFIXME(phrase: string, callback: () -> ())
declare function itFOCUS(phrase: string, callback: () -> ())
declare function itSKIP(phrase: string, callback: () -> ())
declare function fit(phrase: string, callback: () -> ())
declare function xit(phrase: string, callback: () -> ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment