Hi There!
I’m trying to assert formdata using stencil’s flavor of Pupeteer/Jest, but it seems it’s not returning FormData in an event, but an empty object instead.
const prestoSubmit = await page.spyOnEvent('prestoSubmit');
const form = await page.find('presto-form');
form.callMethod('submit');
await page.waitForChanges();
expect(prestoSubmit).toHaveReceivedEvent(); // succeeds
let formData = prestoSubmit.lastEvent.detail.formData.entries();
// prestoSubmit.lastEvent.detail.formData.entries is not a function
It seems to be returning a blank object for the formdata property, but not a formdata object. I wonder if this is supported by Stencil testing?