2018-10-27 01:10:46 +02:00

21 lines
474 B
JavaScript

const postgresql = require('../');
const expect = require('chai').expect;
const rimraf = require('rimraf');
rimraf.sync('./tmp');
describe('init', function () {
this.timeout(5000);
it('should refuse to init a directory that is not empty', function () {
expect(function() {
postgresql.initdb('./');
}).to.throw;
});
it('should init a database directory', function (done) {
postgresql.initdb('./tmp', function () {
done();
});
});
});