it('Should return splitted string as an array', () => { const result = pipe.transform('abc', 'b', 0); expect(result).toEqual([]); });
it('Should return 1.54', () => { expect(pipe.transform(1.5444, 2)).toEqual(1.54); });
it('Should do nothing', () => { expect(pipe.transform('a', 1, '')).toEqual('a'); });
it('Should return the value unchanged', () => { expect(pipe.transform(1)).toEqual(1); });
it('Should return 1', () => { expect(pipe.transform(0.65, 0)).toEqual(1); });
it('should create an instance', () => { expect(new Usuario()).toBeTruthy(); });
it('Should return 2.5', () => { expect(pipe.transform([1,2,3,4])).toEqual(2.5); });
it ('Should return the numbers in ascending order', () => { const result = pipe.transform(numbers, ['+']); expect(result).toEqual([-1, 0.214, 1234, 582, 8675309]); });
it ('Should return the numbers in descending order', () => { const result = pipe.transform(numbers, ['-']); expect(result).toEqual([8675309, 582, 1234, 0.214, -1]); });
it ('Should return the fruits in ascending order', () => { const result = pipe.transform(fruits, '+'); expect(result).toEqual(['apple', 'banana', 'grape', 'orange', 'pear']); expect(fruits).toEqual(["orange", "apple", "pear", "grape", "banana"]); // Check integrity });