Open villander opened 5 years ago
I'm sorry, but I don't really understand what you are asking here. Can you describe what you expected to happen (and possibly why)? What did happen?
sorry @rwjblue. I need tests this input with paste
event, but when i use fillIn
helper the value appears in the input, but using the application the value should not even be inserted into the input.
Basically I need to test the past event on my input.
@villander if you need to test the paste event, you can use triggerEvent
:
const getDataSpy = sinon.spy();
await fillIn('input', 'hello world paste');
await triggerEvent('input', 'paste', {
clipboardData: {
getData: getDataSpy
}
});
on tests the value is forced and hook paste don't prevent a invalid value.