/js-testing

Basic js automated testing configurations.

Primary LanguageJavaScript

Testing

Setup:

  • npm install
  • cp .env.example .env
  • Edit the new .env file. Set SITE_TEST_BASE_URL to your target url.

Nightwatch - Functional

Use nightwatch for writing functional tests.

npm run test:nightwatch

Writing Tests

Create new tests in the tests/nightwatch folder. They will be picked up automatically.

Writing Commands

Create new commands (methods that get attached to the browser object) in the commands folder. They will get picked up automatically.

References

Lighthouse - Performance

Use lighthouse for performance testing.

npm run test:lighthouse

References