Skip to content

Pipe spec should be valid #856

@johnpapa

Description

@johnpapa

Notice the spec below has an assert. The pipe.transform should not be using boolean, it should be using the type of value for the pipe. Or change the test.

import {
  it,
  describe,
  expect,
  inject,
  beforeEachProviders
} from '@angular/core/testing';
import { SortSpeakersPipe } from './sort-speakers.pipe';

describe('SortSpeakers Pipe', () => {
  beforeEachProviders(() => [SortSpeakersPipe]);

  it('should transform the input', inject([SortSpeakersPipe], (pipe: SortSpeakersPipe) => {
      expect(pipe.transform(true)).toBe(null);
  }));
});

Otherwise, it makes it red like this
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenteffort1: easy (hours)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions