dom-testing-library-template icon indicating copy to clipboard operation
dom-testing-library-template copied to clipboard

Remove unnecessary stuff

Open kentcdodds opened this issue 6 years ago • 8 comments

I don't think there's a reason to include kcd-scripts in here.

Let's see if we can slim this repo down to only what's necessary.

kentcdodds avatar Jul 12 '19 18:07 kentcdodds

Note that the packages will need to be updated to the right scope. I'd do it myself, but I have limited internet/computer access ATM.

kentcdodds avatar Jul 16 '19 03:07 kentcdodds

Should we archive this repository in favor of https://codesandbox.io/s/react-testing-library-help-uztri? It's a fork of your sandbox, which I believe was forked from this repository.

nickserv avatar Jul 17 '20 05:07 nickserv

Codesandbox has a variety of issues running tests, can we keep this repo and pull in any relevant changes from over there?

alexkrolick avatar Jul 17 '20 05:07 alexkrolick

You can still export a Code Sandbox as a zip or GitHub repository if you have issues with that. I think collaborating on Code Sandbox is easier if we don't need to enforce code reviews, we already have an organization that lets us edit each others templates.

nickserv avatar Jul 17 '20 10:07 nickserv

Maybe we could use the node template instead of the react template. That would effectively allow us to do everything.

I use the node template for this repo: https://codesandbox.io/s/github/kentcdodds/testing-node-apps

kentcdodds avatar Jul 17 '20 13:07 kentcdodds

I imagine the in-browser Jest stuff (which should be getting updated soon) would run much faster, as Code Sandbox has to wait for the whole Docker container to boot before Node/Jest can start. I still think it would be a good idea to use containers for things like native testing library and puppeteer that require Node though.

nickserv avatar Jul 17 '20 13:07 nickserv

Yes, it is quite a bit slower. Maybe we could do what we do in https://github.com/kentcdodds/react-testing-library-examples

Tests that don't work in codesandbox are in a separate directory and the jest config (which only applies when running locally) will run all the tests.

kentcdodds avatar Jul 17 '20 14:07 kentcdodds

I think individual sandboxes are easier to use though. It makes the package installation faster and it means that the link can go to a specific file (for example src/index.test.js for React). Also I don't think Code Sandbox supports multiple build tools in a single sandbox without containers.

Alternatively we could have a repository where each directory is a sandbox, but I'm not sure if we'd need that yet given that we can already have multiple in the Code Sandbox organization.

nickserv avatar Jul 17 '20 14:07 nickserv