Skip to content

Commit

Permalink
Added integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Kużyński committed Dec 18, 2021
1 parent 808132b commit 4ad92b0
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test/integrationTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import {compare} from '@src/compare';

describe('integration', () => {
it.each([
[5, true],
[10, false],
[15, false]
])('is %s smaller than 10', (value, expected) => {
expect(compare(value, 10).isLess).toBe(expected);
})

it.each([
[5, true],
[10, true],
[15, false]
])('is %s smaller or equal than 10', (value, expected) => {
expect(compare(value, 10).isLessOrEqual).toBe(expected);
});

it.each([
[5, false],
[10, true],
[15, false]
])('is %s equal to 10', (value, expected) => {
expect(compare(value, 10).isEqual).toBe(expected);
});

it.each([
[5, false],
[10, false],
[15, true]
])('is %s greater than 10', (value, expected) => {
expect(compare(value, 10).isGreater).toBe(expected);
});

it.each([
[5, false],
[10, true],
[15, true]
])('is %s greater or equal 10', (value, expected) => {
expect(compare(value, 10).isGreaterOrEqual).toBe(expected);
});
})

0 comments on commit 4ad92b0

Please sign in to comment.