GoogleCloudPlatform / stackdriver-errors-js

Client-side JavaScript exception reporting library for Cloud Error Reporting
https://cloud.google.com/error-reporting/
Apache License 2.0
362 stars 54 forks source link

Switch npm test to using mocha directly #54

Closed bz2 closed 5 years ago

bz2 commented 5 years ago

Remove gulp-mocha-phantomjs dependency and run tests without a browser context. Loading test.html in a browser still succeeds.

Remove gulp test task.

Update to latest chai version now phantomjs is not involved.

Introduce setup file for tests that requires the needed components and populates the global object. This can be folded back into the test file later and a browser importable version generated as a step in the build process.

Only handle requests in the mock XMLHttpRequest implementation which match the endpoint url.

Resolves (half of) #51 along with #55 change to linter.

steren commented 5 years ago

Thanks. LGTM, but can you resolve conflicts from #55?

bz2 commented 5 years ago

Have rebased to resolve conflicts, and added lint overrides. Trying to do reviewable pieces so there's a little juggling around required.