the-road-to-graphql / fullstack-apollo-express-postgresql-boilerplate

💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
https://roadtoreact.com
MIT License
1.2k stars 261 forks source link

Server: NPM Scripts for Testing #7

Open rwieruch opened 6 years ago

rwieruch commented 6 years ago

At the moment, there are two scripts in order to test the server. One to start the test server and the second one to execute the tests. Is there a way to put this into one command for being able to test in only one command line tab? I am looking for something like this but it didn't work for me.

pmosconi commented 5 years ago

The only way I can think of is refactoring the code and moving database seeding and server startup within a test setup file. I am creating a pull request for this.

Sharlaan commented 5 years ago

Hello I've been working on a Typescript version of this repo (intending to make a PR once done) It is still WIP but i refactored a few things already, including e2e tests with Jest*, running in one command.

You can run it from here

Hope it helps ;)

PS don't hesitate to comment the last commit.

rwieruch commented 5 years ago

Thank you for sharing @Sharlaan 👍 A TypeScript version would be great for https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate/issues/41 but I would want to try to only introduce TS and nothing else to keep the tutorial still relevant :)