knex/test/index.js

52 lines
1.2 KiB
JavaScript
Raw Normal View History

/*global describe*/
'use strict';
require('source-map-support').install();
2013-09-05 16:36:49 -04:00
global.sinon = require("sinon");
2013-05-04 02:57:12 -04:00
2014-04-16 01:23:50 -04:00
var chai = global.chai = require("chai");
2013-09-12 13:30:47 -04:00
2013-09-05 16:36:49 -04:00
chai.use(require("sinon-chai"));
chai.should();
var Promise = global.testPromise = require('bluebird');
global.expect = chai.expect;
global.d = new Date();
2013-03-19 20:28:03 -04:00
Promise.longStackTraces();
describe('Query Building Tests', function() {
this.timeout(process.env.KNEX_TEST_TIMEOUT || 5000);
2015-04-22 12:11:23 -04:00
require('./unit/query/builder')
require('./unit/schema/mysql')('mysql')
require('./unit/schema/mysql')('mysql2')
2015-04-22 12:11:23 -04:00
require('./unit/schema/postgres')
Add redshift support without changing cli or package.json (#2233) * Add a Redshift dialect that inherits from Postgres. * Turn .index() and .dropIndex() into no-ops with warnings in the Redshift dialect. * Update the Redshift dialect to be compatible with master. * Update package.json * Disable liftoff cli * Remove the CLI * Add lib to the repo * Allow the escaping of named bindings. * Update dist * Update the Redshift dialect’s instantiation of the query and column compilers. * Update the distribution * Fix a merge conflict * Take lib back out * Trying to bring back in line with tgreisser/knex * Add npm 5 package-lock * Bring cli.js back in line * Bring cli.js back in line * Progress commit on redshift integration tests * Revert "Progress commit on redshift integration tests" This reverts commit 207e31635c638853dec54ce0580d34559ba5a54c. * Progress commit * Working not null on primary columns in createTable * Working redshift unit tests * Working unit and integration tests, still need to fix migration tests * Brought datatypes more in line with what redshift actually supports * Added query compiler unit tests * Add a hacky returning clause for redshift ugh * Working migration integration tests * Working insert integration tests * Allow multiple insert returning values * Working select integration tests * Working join integration tests * Working aggregate integration tests * All integration suite tests working * Put docker index for reconnect tests back * Redshift does not support insert...returning, there does not seem to be a way around that, therefore accept it and test accordingly * Leave redshift integration tests in place, but do not run them by default * Fix mysql order by test * Fix more tests * Change test db name to knex_test for consistency * Address PR comments
2018-02-03 08:33:02 -05:00
require('./unit/schema/redshift')
2015-04-22 12:11:23 -04:00
require('./unit/schema/sqlite3')
require('./unit/schema/oracle')
require('./unit/schema/mssql')
require('./unit/schema/oracledb')
require('./unit/migrate/migrator')
require('./unit/seed/seeder')
})
describe('Integration Tests', function() {
this.timeout(process.env.KNEX_TEST_TIMEOUT || 5000);
require('./integration')
})
var config = require('./knexfile');
if (config.oracledb) {
describe('Oracledb driver tests', function() {
this.timeout(process.env.KNEX_TEST_TIMEOUT || 5000);
require('./unit/dialects/oracledb');
});
}
if(config.postgres) {
require('./unit/dialects/postgres');
}