Alexandre Bodin 0fc01f5a40 Load groups
2019-07-02 13:28:15 +02:00

38 lines
767 B
JavaScript

const knex = require('knex');
const createTable = require('../create-table');
let con;
describe('Create Table', () => {
beforeAll(() => {
con = knex({
client: 'sqlite',
connection: {
filename: './test.sqlite',
},
useNullAsDefault: true,
});
});
test('That works', () => {
return createTable(
{
collectionName: 'something',
attributes: {
id: {
type: 'specificType',
specificType: 'serial primary key',
},
title: {
type: 'string',
required: true, // not nullable
unique: true, // or [args]
default: 'hello',
},
},
},
{ knex: con, client: 'pg' }
);
});
});