mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Refactored deprecated usage of [files] option param for triggerEvent
This commit is contained in:
parent
5bad7aef05
commit
2c28f7cb1c
|
@ -14,10 +14,10 @@ export function createFile(content = ['test'], options = {}) {
|
||||||
|
|
||||||
export function fileUpload(target, content, options) {
|
export function fileUpload(target, content, options) {
|
||||||
let file = createFile(content, options);
|
let file = createFile(content, options);
|
||||||
// TODO: replace `[file]` with `{files: [file]}` after upgrading ember-test-helpers
|
|
||||||
return triggerEvent(
|
return triggerEvent(
|
||||||
target,
|
target,
|
||||||
'change',
|
'change',
|
||||||
[file]
|
{files: [file]}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue