Remove truncation from test setup
This commit is contained in:
parent
2a4fedf03c
commit
d3e5da66c4
@ -17,8 +17,6 @@ let nodeQuery = reload('../../lib/NodeQuery')(config);
|
|||||||
let qb = nodeQuery.getQuery();
|
let qb = nodeQuery.getQuery();
|
||||||
|
|
||||||
suite('Mysql2 adapter tests -', () => {
|
suite('Mysql2 adapter tests -', () => {
|
||||||
suiteSetup(done => qb.truncate('create_test').then(() => done()));
|
|
||||||
|
|
||||||
test('nodeQuery.getQuery = nodeQuery.init', () => {
|
test('nodeQuery.getQuery = nodeQuery.init', () => {
|
||||||
expect(nodeQuery.getQuery())
|
expect(nodeQuery.getQuery())
|
||||||
.to.be.deep.equal(qb);
|
.to.be.deep.equal(qb);
|
||||||
|
@ -19,14 +19,6 @@ let qb = nodeQuery.getQuery();
|
|||||||
let qb2 = null;
|
let qb2 = null;
|
||||||
|
|
||||||
suite('Pg adapter tests -', () => {
|
suite('Pg adapter tests -', () => {
|
||||||
suiteSetup(done => {
|
|
||||||
qb.truncate('create_join').then(() => {
|
|
||||||
qb.truncate('create_test').then(() => {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
test('nodeQuery.getQuery = nodeQuery.init', () => {
|
test('nodeQuery.getQuery = nodeQuery.init', () => {
|
||||||
expect(nodeQuery.getQuery())
|
expect(nodeQuery.getQuery())
|
||||||
.to.be.deep.equal(qb);
|
.to.be.deep.equal(qb);
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
-- sample data to test MySQL
|
-- sample data to test MySQL
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `create_join`
|
-- Table structure for table `create_join`
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `create_join`;
|
DROP TABLE IF EXISTS `create_join` CASCADE;
|
||||||
CREATE TABLE `create_join` (
|
CREATE TABLE `create_join` (
|
||||||
`id` int(10) NOT NULL,
|
`id` int(10) NOT NULL,
|
||||||
`key` text,
|
`key` text,
|
||||||
@ -18,7 +17,7 @@ ALTER TABLE `create_join`
|
|||||||
-- Table structure for table `create_test`
|
-- Table structure for table `create_test`
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `create_test`;
|
DROP TABLE IF EXISTS `create_test` CASCADE;
|
||||||
CREATE TABLE `create_test` (
|
CREATE TABLE `create_test` (
|
||||||
`id` int(10) NOT NULL,
|
`id` int(10) NOT NULL,
|
||||||
`key` text,
|
`key` text,
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
-- sample data to test PostgreSQL INFORMATION_SCHEMA
|
-- sample data to test PostgreSQL INFORMATION_SCHEMA
|
||||||
|
DROP TABLE IF EXISTS "create_join" CASCADE;
|
||||||
|
DROP TABLE IF EXISTS "create_test" CASCADE;
|
||||||
|
|
||||||
-- Table create_join
|
-- Table create_join
|
||||||
CREATE TABLE create_join (
|
CREATE TABLE "create_join" (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
key text,
|
key text,
|
||||||
val text
|
val text
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE create_test (
|
CREATE TABLE "create_test" (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
key text,
|
key text,
|
||||||
val text
|
val text
|
||||||
|
Loading…
Reference in New Issue
Block a user