Skip to content
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

Testcases are failing after upgrading to 11.1+ #567

Closed
vinayk406 opened this issue May 18, 2021 · 4 comments · Fixed by #571
Closed

Testcases are failing after upgrading to 11.1+ #567

vinayk406 opened this issue May 18, 2021 · 4 comments · Fixed by #571

Comments

@vinayk406
Copy link

Testcases are failing with below exception after upgrading to 11.1+ version.

@Component: ___Component
✗ ngOnInit (82ms)
SyntaxError: Unexpected identifier
    at <Jasmine>
    at JitEvaluator.evaluateCode (http://localhost:9876/_karma_webpack_/vendor.js:10798:20)
    at JitEvaluator.evaluateStatements (http://localhost:9876/_karma_webpack_/vendor.js:10768:21)
    at CompilerFacadeImpl.jitExpression (http://localhost:9876/_karma_webpack_/vendor.js:23362:39)

Error: <spyOn> : could not find an object to spy upon for dispatch()
Usage: spyOn(<object>, <methodName>)
Error: <spyOn> : could not find an object to spy upon for dispatch()
Usage: spyOn(<object>, <methodName>)
    at <Jasmine>

Testcases are working as expected with version 11.10.0

@satanTime
Copy link
Member

Hi @vinayk406,

thanks for the report. Might you provide more info about the test?
ng-mocks doesn't use spyOn, so I think, the issue is related to some particular setup.

@satanTime
Copy link
Member

this is the problem 'seriesTooltipTemplate'.replace(new RegExp('[^a-z0-9-_]+', 'mg'), ' ').trim().replace(' ', '_') which should be fixed properly.

@satanTime
Copy link
Member

Hi @vinayk406,

could you verify that the fix works correctly on your project?
ng-mocks.zip

Thanks in advance!

@satanTime
Copy link
Member

v12.0.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants