When you look at README.md you will see at the end of "Test helpers" section line of code with uploadFile helper usage:
uploadFile(content, filename, lastModifiedDate);
Look at the source of test-support/helpers/ember-cli-file-picker.js and createFile function that uses options:
function createFile(content = ['test'], options = {}) {
const {
name,
type,
lastModifiedDate
} = options;
...
}
and createFile usage within the helper:
const uploadFile = Ember.Test.registerAsyncHelper('uploadFile', function(app, content, options) {
const file = createFile(content, options);
...
}
I think that options should be passed as object:
uploadFile(content, {name: filename, type: type, lastModifiedDate: lastModifiedDate});
BTW Please look at Pull Request with very needed changes for test-support/helpers/ember-cli-file-picker.js.
When you look at
README.mdyou will see at the end of "Test helpers" section line of code withuploadFilehelper usage:Look at the source of test-support/helpers/ember-cli-file-picker.js and
createFilefunction that uses options:and
createFileusage within the helper:I think that
optionsshould be passed as object:BTW Please look at Pull Request with very needed changes for
test-support/helpers/ember-cli-file-picker.js.