No, you can run npm build
in a create-react-app in order to compile all react code into a build
directory with a static index.html
page.
It prevents us from getting false positive tests (where the test passes, but real life user interaction fails) or false negatives (where the test fails, but real life code works) by emulating the actual user interaction instead of simply triggering different functions in the code.
It compiles all project code into singluar JS and CSS files, in order to decrease load time and file size. The resulting static files can then be served to clients.
React components are located in a src/index.js
file. The front-end HTML template is stored in a public/index.html
file. Styles are stored in src
directory as well. All front-end html is rendered via the index.html
file to the client.
BDD - behaviour driven development: a branch of test-driven-development using human-readable software requirements as the basis of software tests src.
Acceptance Tests - testing with respect to user requirements, based on acceptance criteria src.
mounting - the act of react adding nodes to the DOM so they can be displayed to the user, and updated by the server.
build - a static compilation of all files in a react project, minified and combined for deployment.