mirror of
https://github.com/knex/knex.git
synced 2025-09-22 22:54:03 +00:00
21 lines
409 B
JavaScript
21 lines
409 B
JavaScript
|
|
module.exports = function(Knex, dbName, resolver) {
|
|
|
|
it('has a sum', function(ok) {
|
|
|
|
Knex('accounts')
|
|
.sum('logins')
|
|
.then(resolver(ok), ok);
|
|
|
|
});
|
|
|
|
it('has a count', function(ok) {
|
|
Knex('accounts').count('id').then(resolver(ok), ok);
|
|
});
|
|
|
|
it("support the groupBy function", function(ok) {
|
|
Knex('accounts').count('id').groupBy('logins').then(resolver(ok), ok);
|
|
});
|
|
|
|
};
|