finish configuring client tests

This commit is contained in:
Elliot DeNolf
2020-10-08 05:20:52 -04:00
parent 60a3e680dd
commit 352dfa9a09
4 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
module.exports = {
verbose: true,
testTimeout: 15000,
testRegex: '(/src/client/.*\\.(test|spec))\\.[jt]sx?$',
setupFilesAfterEnv: ['<rootDir>/tests/client/globalSetup.js'],
};

View File

@@ -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",

View File

@@ -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';

View File

@@ -0,0 +1 @@
import '@testing-library/jest-dom';