add test
This commit is contained in:
parent
314a67fa73
commit
6b07b2287b
|
|
@ -245,3 +245,16 @@ test('should propagate promise rejections', { annotation: { type: 'issue', descr
|
||||||
|
|
||||||
expect(result.output).toContain('some error');
|
expect(result.output).toContain('some error');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should propagate string exception from async arrow function', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32256' } }, async ({ runInlineTest }) => {
|
||||||
|
const result = await runInlineTest({
|
||||||
|
'a.spec.ts': `
|
||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
test('should fail', async () => {
|
||||||
|
await expect.poll(async () => { throw 'some error' }).toBe({ foo: 'baz' });
|
||||||
|
});
|
||||||
|
`
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(result.output).toContain('some error');
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue