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

use explicit error responses in tests #485

Merged

Conversation

dwickern
Copy link
Contributor

@dwickern dwickern commented Feb 6, 2024

Previously these tests simulate an error response with pretender's catchall unhandled request:

Error: Pretender intercepted PUT /people/1 but no handler was defined for this type of request
    at Pretender.unhandledRequest (pretender.es.js:297:1595)
    at Pretender.handleRequest (pretender.es.js:297:263)
    at FakeRequest.send (pretender.es.js:284:496)
    at eval (pretender.es.js:264:85)
    at new Promise (<anonymous>)
    at fetch (pretender.es.js:263:1705)
    at ApplicationAdapter._fetchRequest (rest.js:943:1)
    at ApplicationAdapter.ajax (rest.js:908:1)
    at ApplicationAdapter.updateRecord (rest.js:701:1)
    at -private.js:1022:1

This is annoying because it trips the debugger's uncaught exception breakpoint.

@knownasilya knownasilya added the internal Used for internal changes that still require a mention in the changelog/release notes. label Feb 7, 2024
@knownasilya knownasilya merged commit c9f6ca5 into adopted-ember-addons:master Feb 7, 2024
3 of 11 checks passed
@dwickern dwickern deleted the explicit-test-errors branch February 7, 2024 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Used for internal changes that still require a mention in the changelog/release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants