axax
Version:
A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).
29 lines (28 loc) • 1.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const every_1 = require("../every");
const of_1 = require("../of");
test("every with predicate and with false as a result", async () => {
const result = await every_1.every((value) => value % 2 === 0)(of_1.of(1, 2, 3, 4, 5, 6));
expect(result).toEqual(false);
});
test("every with predicate and with true as a result", async () => {
const result = await every_1.every((value) => value % 2 === 0)(of_1.of(2, 4, 6));
expect(result).toEqual(true);
});
test("every with predicate and with false as a result : edge case scenario", async () => {
const result = await every_1.every((value) => value % 2 === 0)(of_1.of(2, 4, 6, 7));
expect(result).toEqual(false);
});
test("every with predicate and with false as a result : edge case scenario", async () => {
const result = await every_1.every((value) => value % 2 === 0)(of_1.of(1, 3, 5, 6));
expect(result).toEqual(false);
});
test("every with predicate and with false as a result : edge case scenario", async () => {
const result = await every_1.every((value) => value % 2 === 0)(of_1.of(2, 3, 5, 7));
expect(result).toEqual(false);
});
test("every with predicate and with false as a result : edge case scenario", async () => {
const result = await every_1.every((value) => value % 2 === 0)(of_1.of(1, 2, 4, 6));
expect(result).toEqual(false);
});