Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. We occasionally delve into testing on Windows and it's always a PITA. Here are some quick notes we will hopefully remember next time:
  2.  
  3. - `shell-quote` works great on GNU/Linux but single quotes aren't respected on Windows
  4. - 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
  5. - On `node@0.10`, neither `stdout` nor `stderr` is guaranteed to be flushed before calling `process.exit`
  6. - To remedy this, either use a `try/catch` on `stdout/stderr.end()` (since this isn't allowed on `node>=0.12`
  7. - Or use a package like `exit` which counts `drain` events on `stdout/stderr`
  8. - AppVeyor is really easy to integrate with:
  9. 1. Go to AppVeyor, "Add new project", and select our project
  10. 2. Copy the `appveyor.yml` from something like `foundry`
  11. 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)
  12. 4. Push the repo and it will automatically build
  13. 5. Badges can be found under the project settings
  14. - 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