1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-22 06:39:42 +02:00

Move testing to 3001 port (#8)

Create separate database for testing
Add runtime configuration file support
This commit is contained in:
George Berezhnoy 2018-10-07 19:15:10 +03:00 committed by GitHub
parent 073772c047
commit 452d0ae816
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 547 additions and 36 deletions

View file

@ -1,8 +1,19 @@
const {expect} = require('chai');
const fs = require('fs');
const path = require('path');
const config = require('../../config');
const Page = require('../../src/models/page');
const {pages} = require('../../src/utils/database');
describe('Page model', () => {
after(() => {
const pathToDB = path.resolve(__dirname, '../../', config.database, './pages.db');
if (fs.existsSync(pathToDB)) {
fs.unlinkSync(pathToDB);
}
});
it('Working with empty model', async () => {
let page = new Page();