-
Notifications
You must be signed in to change notification settings - Fork 49
Add tests #25
Comments
Is it possible to have a wrapper that could exist side-by-side to the repos and still handle the tests? As much as it is feasible, I would really like it if the repos(client/portal) never included any code that wasn't of our own typing. |
If you install jest globally with that |
In that case, I'm up for it :) |
Would you mind explaining your reasoning here @neauoire? When you say "any code that wasn't of our own typing", do you mean code being 'distributed' or 'deployed' to the client/portal sites via Dat? Or do you mean any code in the site folders? The usual way that third-party development dependencies are handled in JavaScript-land is that a I don't mean to sound critical (or patronising), it's a worthy goal, but I'm just wondering if in the context of development and testing tools it's somewhat misplaced. The method that @lsjroberts has described circumvents the need to declare or install dependencies within the project folders, but with that we miss out on valuable features like version tracking. What if some tests fail with older versions of the testing tool (e.g. Jest) and so we're required to use the latest version. Rather than this information implicitly belonging in the repository it's instead documented elsewhere (if at all). On the original topic: 👍 for Jest from me, though I also like AVA. Is it worth getting linting/formatting in place via ESLint and/or Prettier at this stage too? (A separate issue and PR perhaps?) |
@saulhardman On prettier we did that on the old repo, worth doing on this one too. Separate PR is a good shout. Linting is probably not so necessary if we have prettier, but I'm not against it. |
@neauoire Could you add me as a collaborator again on this and rotonde-portal if that's ok? I need those perms to be able to set up Travis CI. |
Initial tests added in #32, more to come on the rest of the scripts. |
@lsjroberts should the testing paraphernalia be added to |
@saulhardman Yes, I wasn't aware that was a thing. I'll do that now. |
Never mind on that, looks like it just took a little while to find these repos. I'll set this up later today. |
Turns out actually I can't set it up, doh. |
I am about to start writing some tests so we can make sure new pull requests aren't breaking existing feature.
The policy is no external libraries, but this is kind of a must for testing. Is that ok?
I would like to go with Jest as it does not require any configuration and has a very nice UX.
It does require node to run, but that's a pretty common thing for javascript developers so hopefully a minor hurdle. It is also making progress towards being able to run the tests in the browser so that'll make it even easier.
Developers will still need to install jest though through npm with
npm install -g jest
.It'll integrate with Travis CI which can run on each PR so devs don't necessarily have to run it locally before creating a PR. Particularly useful for first time contributors.
Thoughts?
The text was updated successfully, but these errors were encountered: