Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- We occasionally delve into testing on Windows and it's always a PITA. Here are some quick notes we will hopefully remember next time:
- - `shell-quote` works great on GNU/Linux but single quotes aren't respected on Windows
- - Instead of using `shell-quote` + `exec`, use `buffered-spawn`. It's the same callback signature except we pass the untouched arguments to a `spawn` call
- - On `node@0.10`, neither `stdout` nor `stderr` is guaranteed to be flushed before calling `process.exit`
- - To remedy this, either use a `try/catch` on `stdout/stderr.end()` (since this isn't allowed on `node>=0.12`
- - Or use a package like `exit` which counts `drain` events on `stdout/stderr`
- - AppVeyor is really easy to integrate with:
- 1. Go to AppVeyor, "Add new project", and select our project
- 2. Copy the `appveyor.yml` from something like `foundry`
- 3. Write a `test-windows` which uses the `--reporter spec` setting for easier debugging on AppVeyor (dots are impossible to see, as well as figure out what step failed)
- 4. Push the repo and it will automatically build
- 5. Badges can be found under the project settings
- - Upgrade to a new version of `mocha` to get better Windows support (which is really helpful for AppVeyor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement