1 import { ArrayPipe } from './array.pipe';
3 describe('ArrayPipe', () => {
4 const pipe = new ArrayPipe();
6 it('create an instance', () => {
7 expect(pipe).toBeTruthy();
10 it('transforms string to array', () => {
11 expect(pipe.transform('foo')).toStrictEqual(['foo']);
14 it('transforms array to array', () => {
15 expect(pipe.transform(['foo'], true)).toStrictEqual([['foo']]);
18 it('do not transforms array to array', () => {
19 expect(pipe.transform(['foo'])).toStrictEqual(['foo']);