]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/array.pipe.spec.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / array.pipe.spec.ts
1 import { ArrayPipe } from './array.pipe';
2
3 describe('ArrayPipe', () => {
4 const pipe = new ArrayPipe();
5
6 it('create an instance', () => {
7 expect(pipe).toBeTruthy();
8 });
9
10 it('transforms string to array', () => {
11 expect(pipe.transform('foo')).toStrictEqual(['foo']);
12 });
13
14 it('transforms array to array', () => {
15 expect(pipe.transform(['foo'], true)).toStrictEqual([['foo']]);
16 });
17
18 it('do not transforms array to array', () => {
19 expect(pipe.transform(['foo'])).toStrictEqual(['foo']);
20 });
21 });