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

Contributor can run tests for this project on Windows #32

Merged
merged 4 commits into from
Dec 19, 2019

Conversation

rwalle61
Copy link
Collaborator

@rwalle61 rwalle61 commented Dec 16, 2019

As #30 (comment) shows, contributors on windows should be able to run this project.

I don't have a Windows machine but these changes allowed npm run test:full to succeed on a Windows 10 WM and also the Travis builds.

Changes:

@rwalle61
Copy link
Collaborator Author

Migrating discussion from #30 (comment):

Thanks @rwalle61 – I was able to install the support-windows branch and run setup.test.js, definedServerPath.test.js and differentRequetModules.test.js.
However, I could not execute satisfyApiSpec.test.js – not sure why, could be my IDE setup
Changing to directory test/unit/assertions and running > mocha satisfyApiSpec.test.js caused some errors because it could not resolve the 2 openapi files.

@rwalle61
Copy link
Collaborator Author

rwalle61 commented Dec 17, 2019

@GSDTN, would you mind posting the errors you got trying

However, I could not execute satisfyApiSpec.test.js – not sure why, could be my IDE setup

I also get errors (on mac) if I try

Changing to directory test/unit/assertions and running > mocha satisfyApiSpec.test.js caused some errors because it could not resolve the 2 openapi files.

(Though I did ../../../node_modules/mocha/bin/mocha because I don't have mocha globally installed - not sure if that makes a difference).

I can see if there's a way to fix that, but in any case I think we need to see your errors that are unique to windows :)

@GSDTN
Copy link

GSDTN commented Dec 17, 2019 via email

@rwalle61
Copy link
Collaborator Author

I agree with this:

So the error on satisfyApiSpec I was seeing is likely more my approach to running the test than the test itself.

Re:

How would you recommend running the satisfyApiSpec test. Or all tests globally.

npm test should work. (And it works on Travis. npm run test:coverage calls npm test, and npm run test:full calls npm run test:coverage)

@rwalle61 rwalle61 changed the title Support windows Windows developer can run tests for this project Dec 18, 2019
@rwalle61 rwalle61 added the enhancement New feature or request label Dec 18, 2019
@rwalle61
Copy link
Collaborator Author

@GSDTN unless you have objections I will merge this since this change might benefit some Windows developers. Happy to extend this to work for you too if we figure out what goes wrong when you run npm test

@rwalle61 rwalle61 merged commit 8324154 into openapi-library:master Dec 19, 2019
@rwalle61 rwalle61 deleted the support-windows branch December 19, 2019 11:42
@rwalle61 rwalle61 mentioned this pull request Dec 19, 2019
@rwalle61 rwalle61 changed the title Windows developer can run tests for this project Contributor can run tests for this project on Windows Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants