-
-
Notifications
You must be signed in to change notification settings - Fork 865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add razzle test
command
#270
Comments
Yes... this would be nice. I'm struggling to get my tests running. More specifically, my const assets = require(process.env.RAZZLE_ASSETS_MANIFEST); The error (specifically) is |
For future: I solved this locally by using this line: const assets = env === 'test' ? {} : require(process.env.RAZZLE_ASSETS_MANIFEST) |
Why are you testing the server with jest in the first place? |
Why not? It's a fine test runner and then server-side and client-side are matched with technology. Plus jasmine (the assertion framework) doesn't care. I'm interested to know what the opposition viewpoint is... |
I guess I could have been a bit more specific here.... I love Jest for testing Node API's. It's fantastic. My suggestion, however, is that you not use Razzle to serve your API / do things with your DB directly. You should do that on a separate server and communicate with it over HTTP or GraphQL. |
I am... server-side and client-side.
What do you for your mode later? I've been experimenting with sequelize, knex, and typeorm (typescript)
Any preference for one or another, out of curiosity.
Get Outlook for iOS
On Sun, May 28, 2017 at 12:48 PM -0700, "Jared Palmer" <[email protected]> wrote:
I guess I could have been a bit more specific here....
I love Jest for testing Node API's. It's fantastic.
My suggestion, however, is that you not use Razzle to serve your API / do things with your DB directly. You should do that on a separate server and communicate with it over HTTP or GraphQL.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
We use Mongo or Dynamo for almost everything. While we don't use Node.js on the backend in production anymore, on some of my Node.js side projects, I use my own DAO layer that looks like this: https://gist.github.com/jaredpalmer/5e5617f2aac34c468938d1728906f16e . |
Oh interesting. What do you use for your backend?
Get Outlook for iOS
On Sun, May 28, 2017 at 1:12 PM -0700, "Jared Palmer" <[email protected]> wrote:
We use Mongo or Dynamo for almost everything. While we don't use Node.js on the backend in production anymore, on some of my side projects, I use my own DAO layer that looks like this: https://gist.github.com/jaredpalmer/5e5617f2aac34c468938d1728906f16e .
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No description provided.
The text was updated successfully, but these errors were encountered: