Skip to content

Pipe spec should be valid #856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnpapa opened this issue May 20, 2016 · 2 comments · Fixed by #1085
Closed

Pipe spec should be valid #856

johnpapa opened this issue May 20, 2016 · 2 comments · Fixed by #1085
Labels
effort1: easy (hours) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@johnpapa
Copy link
Contributor

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

@deebloo
Copy link
Contributor

deebloo commented May 21, 2016

since by default the the first argument for transform is 'any' this shouldn't be a problem should it?

@filipesilva filipesilva added type: enhancement effort1: easy (hours) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jun 2, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants