finish configuring client tests
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
testTimeout: 15000,
|
||||
testRegex: '(/src/client/.*\\.(test|spec))\\.[jt]sx?$',
|
||||
setupFilesAfterEnv: ['<rootDir>/tests/client/globalSetup.js'],
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"lint": "eslint .",
|
||||
"test": "yarn test:int && yarn test:client",
|
||||
"test:int": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.js NODE_ENV=test DISABLE_LOGGING=true jest --forceExit --runInBand",
|
||||
"test:client": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.js NODE_ENV=test jest --config=jest.react.config.js src/client/client.spec.js"
|
||||
"test:client": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.js NODE_ENV=test jest --config=jest.react.config.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.11.6",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import Separator from './components/elements/Paginator/Separator';
|
||||
|
||||
1
tests/client/globalSetup.js
Normal file
1
tests/client/globalSetup.js
Normal file
@@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom';
|
||||
Reference in New Issue
Block a user