Skip to content

Commit 8847937

Browse files
committed
adding a test for selector being present in errors
1 parent 5818cc5 commit 8847937

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

smoke-tests/scenarios/basic-test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,18 @@ function basicTest(scenarios: Scenarios, appName: string) {
308308
});
309309
await render(<template><div {{on}}>Click</div></template>);
310310
});
311+
312+
test('error message includes element selector', async function (assert) {
313+
assert.expect(1);
314+
const noop = undefined;
315+
setupOnerror((error) => {
316+
assert.true(
317+
/button#my-id\\.class1\\.class2/.test(error.message),
318+
'Expected element selector in error, got: ' + error.message
319+
);
320+
});
321+
await render(<template><button id="my-id" class="class1 class2" {{on "click" noop}}>Click</button></template>);
322+
});
311323
});
312324
`,
313325
},

0 commit comments

Comments
 (0)