Skip to content

test: expand unit coverage for service + initializer#56

Closed
TheRealAgentK wants to merge 1 commit into
mainfrom
test/expand-coverage
Closed

test: expand unit coverage for service + initializer#56
TheRealAgentK wants to merge 1 commit into
mainfrom
test/expand-coverage

Conversation

@TheRealAgentK
Copy link
Copy Markdown
Contributor

@TheRealAgentK TheRealAgentK commented Apr 26, 2026

Closing — these test additions have been rolled into #55, which now contains both the dependency cleanup and the expanded test coverage as a single combined PR.

Adds 18 new tests, raising total from 9 to 26 (excluding the ember-qunit
harness check). Closes the test-gap items called out in AGENTS.md §8.7.

Service (tests/unit/services/raygun-test.js):
- setUser forwards args to rg4js('setUser', ...)
- trackEvent supports the pageView payload shape
- apiKey, enableCrashReporting, enablePulse setters call rg4js with the
  correct command + value, and getters round-trip
- New 'when rg4js is unavailable' submodule verifies graceful
  degradation: send/setUser/trackEvent return null + warn; the three
  property setters are no-ops + warn

Instance initializer (tests/unit/instance-initializers/raygun-test.js):
- RSVP.on('error') handler is registered and forwards { error } to
  raygun.send
- applicationInstance.onerror is wrapped and routes errors to
  raygun.send
- A previously-installed onerror handler is preserved (chained), not
  replaced
- router.routeDidChange subscription is created and emits a
  trackEvent({ type: 'pageView', path: ... }) per transition
- When enableCrashReporting is false: no RSVP handler, no onerror
  replacement, no routeDidChange subscription
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.

1 participant