Jest
Dogu provides jest integration for users who use jest.
The @dogu-tech/jest-environment package provides a custom jest environment that allows you to check the test results of the Dogu Routine.
Requirements
- Node.js 16.0.0 or higher
Configuration
- install
@dogu-tech/jest-environment
package to your project.
# using npm
npm install --save-dev @dogu-tech/jest-environment
# using yarn
yarn add --dev @dogu-tech/jest-environment
# using pnpm
pnpm add --save-dev @dogu-tech/jest-environment
- register
@dogu-tech/jest-environment
to your jest configuration.
// jest.config.js
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: '@dogu-tech/jest-environment',
// ... other jest configurations
};
Global Variables
Version: 1.1.3
Dogu provides global variables for use in tests.
driver
The driver
variable is a webdriverio instance.
doguConfig
dogu.config.json
is parsed and passed to this variable.
jest configuration
see official document for more information.