You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When try to simulate error on one-has-many I get this error:
Error: WHERE parameter "id" has invalid "undefined" value
at MySQLQueryGenerator.whereItemQuery (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2063:13)
at Utils.getComplexKeys.forEach.prop (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2052:25)
at Array.forEach (<anonymous>)
at MySQLQueryGenerator.whereItemsQuery (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2050:35)
at MySQLQueryGenerator.getWhereConditions (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2462:19)
at MySQLQueryGenerator.selectQuery (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1283:28)
at QueryInterface.select (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/query-interface.js:1121:27)
at Promise.try.then.then.then (/Users/davidcosta/workplace/withmoney-api/node_modules/sequelize/lib/model.js:1755:34)
at tryCatcher (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/promise.js:694:18)
at _drainQueueStep (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/async.js:131:9)
at Async.Object.<anonymous>.Async._drainQueues (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues (/Users/davidcosta/workplace/withmoney-api/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
My test:
it.only('get a error listing accounts by user', async () => {
await Controller.accounts(reqMock, resMock);
expect(resMock.status).toBeCalled();
expect(resMock.send).toBeCalled();
expect(resMock.status.mock.calls[0][0]).toEqual(404);
});
The text was updated successfully, but these errors were encountered:
Description:
When try to simulate error on one-has-many I get this error:
My test:
The text was updated successfully, but these errors were encountered: