-
Notifications
You must be signed in to change notification settings - Fork 250
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
Stryker copies binary file incorrectly : a pptx file (during initial test run) #4386
Comments
I've just tested this with version 6.4.2 of stryker and it worked well with that version, so I think it has something to do with stryker 7.0 |
@edi9999 thanks for opening an issue. What is the problem you are facing with this bug? |
The problem is that my software relies on some binary files during testing. Those binary files are "pptx" documents, that need to be copied for the test run. They are copied, but the contents of the file is incorrect : As you can see in this output :
The basefile is 39K big, and the copied file is 64K big, there is probably an encoding issue or something similar. You can reproduce the issue with following script : git clone https://github.com/open-xml-templating/docxtemplater.git
cd docxtemplater
npm install
npm run test:mutations |
I've just made a simpler reproduction case with just one single file and one single test file : To reproduce run :
Full stryker output :
|
Thanks for the extra information, at the moment i don't have time to further investigate this issue. Ill probably take a look Friday next week (15 september) |
The issue is with As of Stryker 7, the default value for This means that all files are interpreted as I think As a workaround, you can disable type checks in {
"disableTypeChecks": false
} |
Thanks a lot for the investigation @nicojs ! It seems to be working indeed ! Not sure to understand what this has to do with types, since docx files are always binary files. |
Exactly. Stryker loads all files from disk and interprets them as UTF-8 just in case it needs to disable type-checking on them later. This is the bug. It should only interpret actual TS-like code files 🧐 |
Summary
Hello, it seems that the stryker command copies docx/pptx files incorrectly in my project.
It worked before (I can't tell when exactly, and which version I used before, but it worked 1 year ago I think).
Stryker environment
Your Environment
Reproduce the issue
You can then view the difference between two files :
It seems that the copied file differ for some reasons.
The text was updated successfully, but these errors were encountered: