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

Treat the environment during webpack build as browser rather than node #61

Merged
merged 1 commit into from
Oct 30, 2020
Merged

Conversation

carlobeltrame
Copy link
Contributor

Fixes #47

I need some help to set up tests for this. I was unable to run the tests locally, since on my local machine, I have installed neither grunt nor python (required for the npm package sleep, which is an optional dependency of karma-xvfb-chrome-launcher) nor java (required for mockserver) nor Chrome (I am running on Ubuntu). Rather, I use all those only in Docker containers when necessary.

I think a useful testing setup would require a new grunt task, like the ones you have set up for node and browser modes. We could take the easy way out and just copy the browser tests and define a global require mock before the tests. Or we could do it the completely correct way and somehow set up a Webpack environment within the tests, similar to how you start an entire browser for the browser tests. Both of these options go a little far given the superficial knowledge I have about this package's structure and build process.

@jamesdbloom jamesdbloom self-requested a review October 30, 2020 15:50
@jamesdbloom jamesdbloom merged commit 32531f4 into mock-server:master Oct 30, 2020
@carlobeltrame
Copy link
Contributor Author

Sorry about the failing build! And thanks for the quick fix.

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

Successfully merging this pull request may close these issues.

Using in browser: fs.existsSync is not a function
2 participants