From d50015af3ca032924bf45740acab054f3a9c287c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Thu, 17 Jan 2019 15:23:24 +0100 Subject: [PATCH] Replace node with babel-node This should ensure that you don't have to reubild the server all the time --- README.md | 10 +--------- dist/.gitkeep | 0 src/jest/hooks.js | 4 ++-- 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 dist/.gitkeep diff --git a/README.md b/README.md index eb814d1f0..1b12562d2 100644 --- a/README.md +++ b/README.md @@ -137,15 +137,7 @@ npm run db:reset **Beware**: We have no multiple database setup at the moment. We clean the database after each test, running the tests will wipe out all your data! -First build `server.js`: -```bash -yarn run build -# -or- -npm run build -``` -The additional build step will become obsolete, as soon as [jest transforms global setup teardown modules](https://github.com/facebook/jest/issues/5164). - -Now run the tests: +Run the tests: ```bash yarn run test # -or- diff --git a/dist/.gitkeep b/dist/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/jest/hooks.js b/src/jest/hooks.js index 80f0de8eb..15daccbdf 100644 --- a/src/jest/hooks.js +++ b/src/jest/hooks.js @@ -5,14 +5,14 @@ let server let seeder const setup = async function () { - server = spawn('node', ['dist/'], { + server = spawn('babel-node', ['src/index'], { env: Object.assign({}, process.env, { GRAPHQL_URI: 'http://localhost:4123', GRAPHQL_PORT: '4123' }) }) - seeder = spawn('node', ['dist/'], { + seeder = spawn('babel-node', ['src/index'], { env: Object.assign({}, process.env, { GRAPHQL_URI: 'http://localhost:4001', GRAPHQL_PORT: '4001',