Skip to content
Snippets Groups Projects
option-list-by-select.pipe.spec.ts 500 B
Newer Older
  • Learn to ignore specific revisions
  • import { OptionListBySelectPipe } from './option-list-by-select.pipe';
    import { SELECT_OPTION_LIST } from '../../../test-data';
    
    describe('[Shared][Pipes] OptionListBySelect', () => {
        let pipe = new OptionListBySelectPipe();
    
        it('should return options corresponding to the given select name', () => {
            expect(pipe.transform(SELECT_OPTION_LIST, 'name_one')).toContain(SELECT_OPTION_LIST[1]);
            expect(pipe.transform(SELECT_OPTION_LIST, 'name_one').length).toEqual(1);
        });
    });