We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I use Sequelize Mock between with a query like that:
const getStats = async () => { const { active, 'in-progress': inProgress, } = await ImmediateCare.findAll({ raw: true, attributes: ['status', [fn('count', col('id')), 'count']], group: ['ImmediateCare.status'], }).then((status) => { const counts = { active: 0, 'in-progress': 0, } status.forEach((s) => { counts[s.status] = parseInt(s.count, 10) }) return counts }) const patientsPerProfessional = inProgress !== 0 ? active / inProgress : active return { active, inProgress, patientsPerProfessional, } }
Is being returned NaN, I'm guessing that is because Sequelize Mock can't mock sequelize.fn('count')
Is that right?
StackOverflow
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I use Sequelize Mock between with a query like that:
Is being returned NaN, I'm guessing that is because Sequelize Mock can't mock sequelize.fn('count')
Is that right?
StackOverflow
The text was updated successfully, but these errors were encountered: