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

Unit tests fail on Windows because of path separator #145

Closed
HyperBrain opened this Issue Jul 4, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@HyperBrain
Copy link
Member

HyperBrain commented Jul 4, 2017

This is a Bug Report

Description

When running npm test on Windows, the unit tests fail like:

      + expected - actual

       {
         "filename": "last"
         "libraryTarget": "commonjs"
      -  "path": "testpath\\.webpack"
      +  "path": "testpath/.webpack"
       }

The failures happen in multiple tests, everywhere where paths are checked against
their expectations.

Proposed solution

The expectations should be composed by using path.sep as path separator to keep the tests platform independent.

@HyperBrain HyperBrain added the bug label Jul 4, 2017

@hassankhan

This comment has been minimized.

Copy link
Contributor

hassankhan commented Jul 4, 2017

Perhaps we could use AppVeyor to run the tests on a Windows-based CI in the future?

@HyperBrain

This comment has been minimized.

Copy link
Member Author

HyperBrain commented Jul 4, 2017

Sounds like a good idea. This would complement Travis (where we can run linux and osx tests) perfectly. I will take care of the Travis integration in the next days, and will do some experiments with AppVeyor too.

@HyperBrain HyperBrain self-assigned this Jul 5, 2017

@HyperBrain

This comment has been minimized.

Copy link
Member Author

HyperBrain commented Jul 14, 2017

The issue on Windows is not just replacing the path separators. After fixing these, the unit tests on Windows still bail out with a failing require that seems to behave differently on Windows and Linux. Did the same test on Linux and it worked.
Will continue with this.

@HyperBrain

This comment has been minimized.

Copy link
Member Author

HyperBrain commented Jul 31, 2017

Will suspend work on this, until the code base for 3.0.0 is ready. Due to the removal of serve and run, the unit tests should be runnable on Windows again with only a few changes.

@HyperBrain

This comment has been minimized.

Copy link
Member Author

HyperBrain commented Aug 17, 2017

V3 merged

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