Giter Club home page Giter Club logo

Comments (6)

timwright12 avatar timwright12 commented on July 16, 2024

We can, but we never settled on one (at least on the FE team). I know React apps use Jest and our best practice docs say Mocha and Chai. I'd like to put more thought into that and figure out what we're Unit testing and the best way to go about it on our more common projects.

from theme-scaffold.

timwright12 avatar timwright12 commented on July 16, 2024

Currently exploring Jest for standard unit testing

from theme-scaffold.

timwright12 avatar timwright12 commented on July 16, 2024

@daveross @tlovett1 It seems like Jest is a decent direction to take, it works in React and non-React environments. We can also run UI (E2E) tests on components to make sure they work as expected in combination with Puppeteer. I'm still learning it a bit, but I threw together a super basic (and poorly written) test as a POC https://github.com/timwright12/10up-unit-testing/tree/master/jest-puppeteer

Leaning heavily towards a recommendation of Jest + Puppeteer for unit and e2e tests. I'm not sure there's anything for the scaffold beyond getting them in the package file and creating a basic "does the site render" test, but that may be a starting point.

from theme-scaffold.

dana-ross avatar dana-ross commented on July 16, 2024

Starting points are good. If we can make it so the team can write tests and drop them in a directory to run with an npm command we've removed a lot of a friction from the process for them. That might be the difference between a project having tests and not having them.

from theme-scaffold.

timwright12 avatar timwright12 commented on July 16, 2024

Yeah, I'm going to do some work testing the framework out, but I think I can get something in place for a PR in a week or two.

I want to make sure the team is OK with the choice as well.

from theme-scaffold.

timwright12 avatar timwright12 commented on July 16, 2024

Seems like we're moving forward with Jest for this.

from theme-scaffold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.