Sequelize : Fix missing test for s.fn() on FindOptions

This commit is contained in:
Raphael Thiebault
2017-03-07 11:39:03 +00:00
parent a37824dc8f
commit 411026b03b
+2
View File
@@ -905,6 +905,7 @@ User.findAll( { attributes: [[s.fn('count', Sequelize.col('*')), 'count']] });
User.findAll( { attributes: [[s.fn('count', Sequelize.col('*')), 'count']], group: ['sex'] });
User.findAll( { attributes: [s.cast(s.fn('count', Sequelize.col('*')), 'INTEGER')] });
User.findAll( { attributes: [[s.cast(s.fn('count', Sequelize.col('*')), 'INTEGER'), 'count']] });
User.findAll( { where : s.fn('count', [0, 10]) } );
User.findById( 'a string' );
@@ -925,6 +926,7 @@ User.findOne( { where : { name : 'worker' }, include : [User] } );
User.findOne( { where : { name : 'Boris' }, include : [User, { model : User, as : 'Photos' }] } );
User.findOne( { where : { username : 'someone' }, include : [User] } );
User.findOne( { where : { username : 'barfooz' }, raw : true } );
User.findOne( { where : s.fn('count', []) } );
/* NOTE https://github.com/DefinitelyTyped/DefinitelyTyped/pull/5590
User.findOne( { updatedAt : { ne : null } } );
*/