mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 09:26:17 -05:00
Updating dependencies for App testing.
This commit is contained in:
parent
6a5a73af22
commit
84802eaf66
5 changed files with 19 additions and 12 deletions
|
|
@ -5,6 +5,17 @@ version: 2.1
|
|||
# Define a job to be invoked later in a workflow.
|
||||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
||||
jobs:
|
||||
app-tests:
|
||||
docker:
|
||||
- image: cimg/node:14.20.0
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: install dependencies
|
||||
command: npm install
|
||||
- run:
|
||||
name: run tests
|
||||
command: npm run test
|
||||
api-tests-eight:
|
||||
docker:
|
||||
- image: cimg/python:3.8
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@artsy/fresnel": "^6.1.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"lodash": "^4.17.19",
|
||||
"npm": "^6.14.7",
|
||||
"query-string": "^6.13.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import React from "react";
|
||||
import {render} from '@testing-library/react';
|
||||
import '@testing-library/jest-dom';
|
||||
import App from "./App";
|
||||
|
||||
Object.defineProperty(window, 'matchMedia', {
|
||||
writable: true, value: jest.fn().mockImplementation(query => ({
|
||||
|
|
@ -10,8 +11,6 @@ Object.defineProperty(window, 'matchMedia', {
|
|||
})),
|
||||
});
|
||||
|
||||
it('renders without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
ReactDOM.render(<App/>, div);
|
||||
ReactDOM.unmountComponentAtNode(div);
|
||||
test('renders without crashing', () => {
|
||||
render(<App/>);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ function ChannelStatistics({statistics}) {
|
|||
|
||||
|
||||
function ChannelPage({create, header}) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
const [deleteOpen, setDeleteOpen] = useState(false);
|
||||
const [validRegex, setValidRegex] = useState(true);
|
||||
|
|
@ -147,7 +146,6 @@ function ChannelPage({create, header}) {
|
|||
};
|
||||
|
||||
setDisabled(true);
|
||||
setLoading(true);
|
||||
|
||||
let response = null;
|
||||
try {
|
||||
|
|
@ -167,7 +165,6 @@ function ChannelPage({create, header}) {
|
|||
return;
|
||||
} finally {
|
||||
setDisabled(false);
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
if (response && response.status >= 200 && response.status < 300) {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ export class Settings extends React.Component {
|
|||
pending,
|
||||
qrCodeValue,
|
||||
throttle_on_startup,
|
||||
timezone,
|
||||
} = this.state;
|
||||
|
||||
const qrButton = <Button icon style={{marginBottom: '1em'}}><Icon name='qrcode' size='big'/></Button>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue