-
Notifications
You must be signed in to change notification settings - Fork 12k
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
SchematicTestRunner.runExternalSchematic fails with "The encoded data was not valid for encoding utf-8" #27643
Comments
This is caused by a long standing bug in Jest which causes See: jestjs/jest#2549 For context this is happening due to the changes in #27570 |
@alan-agius4 thanks for the pointers! It would be great if this could be adressed, as this breaks unit tests of schematics with jest and probably impacts some libraries.. |
…atic fails with "The encoded data was not valid for encoding utf-8" When using Jest instanceof does not work correctly. See: jestjs/jest#2549 Closes: angular#27643
…matic` fails with "The encoded data was not valid for encoding utf-8" When using Jest instanceof does not work correctly. See: jestjs/jest#2549 Closes: angular#27643
…matic` fails with "The encoded data was not valid for encoding utf-8" When using Jest instanceof does not work correctly. See: jestjs/jest#2549 Closes: angular#27643
…matic` fails with "The encoded data was not valid for encoding utf-8" When using Jest instanceof does not work correctly. See: jestjs/jest#2549 Closes: #27643
…matic` fails with "The encoded data was not valid for encoding utf-8" When using Jest instanceof does not work correctly. See: jestjs/jest#2549 Closes: #27643 (cherry picked from commit 7b52b98)
…matic` fails with "The encoded data was not valid for encoding utf-8" When using Jest instanceof does not work correctly. See: jestjs/jest#2549 Closes: #27643 (cherry picked from commit 7b52b98)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
other
Is this a regression?
The previous version in which this bug was not present was
17.0.0
Description
With v18.0.0-rc.1 under some conditions (which exactly is unclear to me)
SchematicTestRunner.runExternalSchematic
fails with the following error: "The encoded data was not valid for encoding utf-8"See e.g. https://github.com/daniel-sc/ng-extract-i18n-merge/actions/runs/9091527710/job/24986317152?pr=111
The exact same test runs fine with angular 17: https://github.com/daniel-sc/ng-extract-i18n-merge/actions/runs/9091527710/job/24986316954?pr=111
This is the line were it fails: https://github.com/daniel-sc/ng-extract-i18n-merge/blob/master/schematics/ng-add/index.spec.ts#L45 (unsure why the first invocation succeeds..)
Minimal Reproduction
angular-18
from https://github.com/daniel-sc/ng-extract-i18n-mergenpm i --save-exact "@angular-devkit/[email protected]" "@angular-devkit/[email protected]" "@angular-devkit/[email protected]" "@schematics/[email protected]" "@angular-devkit/[email protected]" "@angular/[email protected]" "@angular/[email protected]"
npm run build
npm run test-coverage
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: