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

Extend binary file extentions list #447

Closed
legopiraat opened this issue Nov 3, 2017 · 4 comments
Closed

Extend binary file extentions list #447

legopiraat opened this issue Nov 3, 2017 · 4 comments

Comments

@legopiraat
Copy link
Contributor

Hi,

Earlier Me and Nico where trying to use Stryker on an Typescript project. We noticed we had some failing tests. After some debugging we found out our .zip files were correctly interpreted as binary files.

Some additional file extensions would be nice.
tar, zip

(Sorry for the unclear explanation)

Greets

@simondel
Copy link
Member

simondel commented Nov 3, 2017

Good call! Would you be interested in adding it yourself? You can find the code here

@nicojs
Copy link
Member

nicojs commented Nov 3, 2017

Maybe we should also give people the change to specify that a file should be handled as binary. For example:

files: [{ pattern: '/path/to/binary', binary: true }]

@simondel
Copy link
Member

simondel commented Nov 3, 2017

We could add that as an extension as well 👍

@nicojs
Copy link
Member

nicojs commented Nov 5, 2017

Hmm maybe it's better to do something like this:

files: [{ pattern: '/path/to/binary', encoding: 'buffer' }]

Using the string 'buffer' for binary files seems to be pretty common in the node world. You can see it used a lot here: https://nodejs.org/api/fs.html. Also: it will also allow for other encodings for text files. Right now: all text files are read using 'utf8'.

EDIT: Not sure if we should use this issue for this extension. Seems more like a feature.

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

No branches or pull requests

3 participants