This commit is contained in:
Simon Knott 2024-08-23 14:51:23 +02:00
parent 314a67fa73
commit 6b07b2287b
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -245,3 +245,16 @@ test('should propagate promise rejections', { annotation: { type: 'issue', descr
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');
});