Skip to content
Snippets Groups Projects
Commit e923fb05 authored by jherman5's avatar jherman5
Browse files

fixed the test issues within app.test.

parent 95c00402
No related branches found
No related tags found
No related merge requests found
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`the app has four colored buttons, red, blue, yellow, and green 1`] = `<div />`;
exports[`the app has one labeled button that displays the value from the store 1`] = `
<div>
<label>
......
/* eslint-disable no-magic-numbers */
import React from 'react';
import { render } from '@testing-library/react';
import './testing/mockRedux.js';
......@@ -7,16 +5,23 @@ import { MemoryRouter as Router } from 'react-router-dom';
import { App } from './app.js';
import {
selectValue,
} from './features/counter/counterSlice.js';
jest.mock('./features/counter/counterSlice.js', () => ({
selectValue: jest.fn().mockName('selectValue'),
jest.mock('./features/patternGen/patternSlice.js', () => ({
selectColorOne: jest.fn().mockName('selectColorOne'),
showColorOne: jest.fn().mockName('showColorOne'),
hideColorOne: jest.fn().mockName('hideColorOne'),
selectColorTwo: jest.fn().mockName('selectColorTwo'),
showColorTwo: jest.fn().mockName('showColorTwo'),
hideColorTwo: jest.fn().mockName('hideColorTwo'),
selectColorThree: jest.fn().mockName('selectColorThree'),
showColorThree: jest.fn().mockName('showColorThree'),
hideColorThree: jest.fn().mockName('hideColorThree'),
selectColorFour: jest.fn().mockName('selectColorFour'),
showColorFour: jest.fn().mockName('showColorFour'),
hideColorFour: jest.fn().mockName('hideColorFour'),
}));
describe('the app', () => {
test('has one labeled button that displays the value from the store', () => {
selectValue.mockReturnValue(9999);
test('has four colored buttons, red, blue, yellow, and green', () => {
const { container } = render(
<Router initialEntries={['/']}>
<App />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment