import { pullAll } from "../../utility/array/pullAll";
describe('pullAll tests...', () => {
test('Method pullAll should receive an array composed of number and return the filtered array', () => {
origin: [1, 2, 3, 1, 2, 3],
const result = pullAll<number>(received.origin, received.selector);
expect(result === received.origin).toBe(expected.isEqual);
result.forEach((v, i) => {
expect(v).toBe(expected.result[i]);
test('Method pullAll should receive an array composed of plain object and return the filtered array', () => {
interface IOriginParams {
const result = pullAll<IOriginParams>(received.origin, received.selector);
expect(result === received.origin).toBe(expected.isEqual);
expect(result.length).toBe(expected.result.length);
test('Method pullAll should receive an array composed of mixed value and return the filtered array', () => {
selector: [false, undefined, 19980808, []],
const result = pullAll<any>(received.origin, received.selector);
expect(result === received.origin).toBe(expected.isEqual);
expect(result.length).toBe(expected.result.length);