Skip to content

Commit

Permalink
fix(jasmine): Use Jasmine assertions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Nov 11, 2018
1 parent dca931e commit 36771ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion source/jasmine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export { MarblesFunction } from "../marbles";
export * from "./observe";

declare const describe: Function;
declare const expect: Function;
declare const fit: Function;
declare const it: Function;
declare const xit: Function;
Expand All @@ -30,7 +31,11 @@ export function configure(configuration: Configuration): {
cases: CasesFunction,
marbles: MarblesFunction
} {
const { marbles } = _configure(configuration);
const { marbles } = _configure({
assert: (a, m) => expect(a).toBeTruthy().withContext(m),
assertDeepEqual: (a, e) => expect(a).toEqual(e),
...configuration
});

function cases<T extends UnnamedCase>(name: string, func: (context: Context, _case: T) => void, cases: { [key: string]: T }): void;
function cases<T extends NamedCase>(name: string, func: (context: Context, _case: T) => void, cases: T[]): void;
Expand Down
4 changes: 2 additions & 2 deletions source/jest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export function configure(configuration: Configuration): {
marbles: MarblesFunction
} {
const { marbles } = _configure({
...configuration,
assertDeepEqual: (a, e) => expect(a).toEqual(e),
frameworkMatcher: true
frameworkMatcher: true,
...configuration
});

function cases<T extends UnnamedCase>(name: string, func: (context: Context, _case: T) => void, cases: { [key: string]: T }): void;
Expand Down

0 comments on commit 36771ca

Please sign in to comment.