test: fix mocha loading esm

pull/4/head
Cameron Clough 2022-03-21 11:35:05 +00:00
parent dcbb661424
commit a8cb1e620e
No known key found for this signature in database
GPG Key ID: BFB3B74B026ED43F
3 changed files with 7 additions and 2 deletions

3
.mocharc.json 100644
View File

@ -0,0 +1,3 @@
{
"require": ["esm"]
}

View File

@ -1,7 +1,7 @@
import path from 'path';
import fs from 'fs';
import { execSync } from 'child_process';
import fs from 'fs';
import log4js from 'log4js';
import path from 'path';
const logger = log4js.getLogger('default');

View File

@ -1,4 +1,6 @@
import 'dotenv/config';
import request from 'supertest';
import app from '../src/server/app';
// TODO better way to only run tests once server is up