I'm trying to do this
sequelize_fixtures.loadFile(['fixtures/user.json', 'fixtures/authentication.json'], models).then(() => { ... }
But it results in the following error:
Unhandled rejection TypeError: glob pattern string required
at new Minimatch (.../node_modules/minimatch/minimatch.js:116:11)
at setopts (.../node_modules/glob/common.js:113:20)
at new Glob (.../node_modules/glob/glob.js:135:3)
at glob (.../node_modules/glob/glob.js:75:10)
at tryCatcher (.../node_modules/bluebird/js/main/util.js:26:23)
at ret (eval at makeNodePromisifiedEval (.../node_modules/bluebird/js/main/promisify.js:163:12), <anonymous>:14:23)
at module.exports.Reader.readFileGlob (.../node_modules/sequelize-fixtures/lib/reader.js:38:12)
at .../node_modules/sequelize-fixtures/index.js:49:19
at Object.loadFile (.../node_modules/sequelize-fixtures/index.js:21:23)
at .../index.js:57:24
at tryCatcher (.../node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (.../node_modules/sequelize/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (.../node_modules/sequelize/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (.../node_modules/sequelize/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (.../node_modules/sequelize/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (.../node_modules/sequelize/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (.../node_modules/sequelize/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (.../node_modules/sequelize/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:800:20)
at tryOnImmediate (timers.js:762:5)
at processImmediate [as _immediateCallback] (timers.js:733:5)
I get the same error if I include only one element in the array:
sequelize_fixtures.loadFile(['fixtures/user.json'], models).then(() => { ... }
but I don't get an error I load the same file not as an array:
sequelize_fixtures.loadFile('fixtures/user.json', models).then(() => { ... }
I'm trying to do this
sequelize_fixtures.loadFile(['fixtures/user.json', 'fixtures/authentication.json'], models).then(() => { ... }But it results in the following error:
I get the same error if I include only one element in the array:
sequelize_fixtures.loadFile(['fixtures/user.json'], models).then(() => { ... }but I don't get an error I load the same file not as an array:
sequelize_fixtures.loadFile('fixtures/user.json', models).then(() => { ... }