We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import {MockBuilder, MockRender, ngMocks} from 'ng-mocks'; import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'phone' }) export class PhonePipe implements PipeTransform { transform(value: any, args?: any): any { const inputVal = value.toString(); const slice1 = inputVal.slice(0, 3); const slice2 = inputVal.slice(3, 6); const slice3 = inputVal.slice(6) return `+1(${slice1})-${slice2}-${slice3}`; } } describe('Phone Pipe', () => { beforeEach(() => { return MockBuilder(PhonePipe).provide(PhonePipe) }) it('should be defined', () => { const fixture = MockRender(PhonePipe); expect(fixture.point.componentInstance).toBeDefined(); }) it('should test the transform value', () => { const fixture = MockRender('{{ "4161234567" | phone }}'); expect(ngMocks.formatText(fixture)).toBe('+1(416)-123-4567'); }) })
The text was updated successfully, but these errors were encountered:
fix(MockRender): renders pipes with $implicit param help-me-mom#2398
eda5bc9
03f5f5e
Merge pull request #2399 from satanTime/issues/2398
91afa66
fix(MockRender): renders pipes with $implicit param #2398
v13.5.1 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.
Sorry, something went wrong.
satanTime
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: