Skip to content

Commit

Permalink
fix(tests): Fix bad max test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpodwysocki authored and trxcllnt committed Sep 1, 2020
1 parent 2793801 commit 3a853ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/iterable/max-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { max } from 'ix/iterable';

test('Itearble#max laws', () => {
const xs = [5, 3, 1, 2, 4];
expect(max(xs)).toBe(max(xs, (x) => x));
expect(max(xs)).toBe(max(xs, { selector: (x) => x }));
});

test('Iterable#max empty throws', () => {
Expand All @@ -16,10 +16,10 @@ test('Iterable#max', () => {
});

test('Iterable#max with selector empty throws', () => {
expect(() => max([], (x) => x * 2)).toThrow();
expect(() => max([], { selector: (x) => x * 2 })).toThrow();
});

test('Iterable#max with selector', () => {
const xs = [5, 3, 1, 2, 4];
expect(max(xs, (x) => x * 2)).toBe(10);
expect(max(xs, { selector: (x) => x * 2 })).toBe(10);
});

0 comments on commit 3a853ee

Please sign in to comment.