Skip to content

test-file-creation.js is not windows aware #601

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

Closed
gintsgints opened this issue Sep 28, 2014 · 11 comments
Closed

test-file-creation.js is not windows aware #601

gintsgints opened this issue Sep 28, 2014 · 11 comments
Labels
Milestone

Comments

@gintsgints
Copy link
Contributor

Expected files should be generated windows aware for slashes.

Also local variable path should not be used in function - assertOnlyFiles
(because this is node global variable for path module)

@kingcody
Copy link
Member

Good call @gintsgints, we'll use path.normalize to take care of that. Thanks :)

@gintsgints
Copy link
Contributor Author

Let me try to take care on this as I have windows to test :)

@kingcody
Copy link
Member

Absolutely! Big thanks 👍

@gintsgints
Copy link
Contributor Author

Can you please let me know why expected is left empty - err.expected = '';
by mistake?

@kingcody
Copy link
Member

Nope, it's for the mocha text diff feature. That way unexpected files show up as red in an error report.

@gintsgints
Copy link
Contributor Author

Yeah but I do not see expected ones in green :)

@gintsgints
Copy link
Contributor Author

I would change this to - err.expected = expectedFiles.join('\n');

@kingcody
Copy link
Member

I see, matter of preference I guess. I didn't want to have to sift through all those files and instead I only wanted to see the ones that were extra, but I'm open to a change. Perhaps see what others have to say on the matter?

@gintsgints
Copy link
Contributor Author

Ok. I will just suggest PR.

@kingcody
Copy link
Member

Sounds good

@gintsgints
Copy link
Contributor Author

Please review and test in linux #602

@JaKXz JaKXz added the bug label Sep 30, 2014
DaftMonk pushed a commit that referenced this issue Oct 6, 2014
- change function assertOnlyFiles to use a different local variable from
global module name - path.
- show expected files when a test fails
- use path.normalize before search in the array

Closes #601
@Awk34 Awk34 added this to the 2.2.0 milestone Jul 14, 2015
@Awk34 Awk34 closed this as completed Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants