Comments (6)
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.
Currently exploring Jest for standard unit testing
from theme-scaffold.
@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.
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.
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.
Seems like we're moving forward with Jest for this.
from theme-scaffold.
Related Issues (20)
- Consider Adopting Parcel HOT 5
- Inline global declarations in the config files generate eslint errors. HOT 3
- Avoid transpiling upstream dependencies HOT 1
- Add `@wordpress/scripts` like auto generation of wp script dependencies HOT 3
- Add styling for wide and full alignment
- Change default alignment of the `core/media-text` block to `none`
- Add .env to support things like overriding the proxied url HOT 1
- Remove eslint from webpack. HOT 2
- Update loading for the block CSS file
- Is `TenUpScaffold\ Overrides\setup();` missing on purpose HOT 2
- Update stylelint HOT 2
- Add ARIA Landmarks to Skeleton HTML
- Add Gutenberg Specific CSS Partial
- Implement Asynchronous CSS HOT 8
- editor-style.css path
- node_modules added to eslintignore HOT 3
- Gutenberg block set up structure.
- SVGs are cropped upon deployment HOT 1
- Add Dynamic Import and Code Splitting Support to Webpack
- PHP warning: function 'FbSustainability\Core\js_disabled_stylesheets' not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from theme-scaffold.