ember-test-helpers: render does not reject when rendering fails
I would have expected this test to pass, but it fails with “expected not to get here” in addition to an out-of-band qunit failure for the actual Compiler Error: not-a-component is not a helper.
test('render can throw', async function(assert) {
try {
await render(hbs`{{not-a-component x="y"}}`);
} catch (err) {
assert.ok(/not-a-component is not a helper/.test(err.message), "expected to see failure");
}
throw new Error("expected not to get here");
});
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 7
- Comments: 15 (11 by maintainers)
I’ve started a PR to finally fix this: #1194. I would appreciate your thoughts!
Any news about this? After more than 2 years?
This twiddle reproduces the issue.
TLDR
There is a component that will throw an error if two attrs arent passed in (
xandy) and the component is clicked on.There are three tests:
Here is where things go wrong:
I still think this is a bug.
rendershould throw.This appears to be a bit stale, but I would love some workarounds as well.