Skip to content
Snippets Groups Projects
Commit b27660bf authored by Avery Jacobsen's avatar Avery Jacobsen :8ball:
Browse files

Correctly removed counter feature and changed minimal-app to inventory-app,...

Correctly removed counter feature and changed minimal-app to inventory-app, however run lint is not working correctly and couldn't find a solution.
parent 2ebbef94
No related branches found
No related tags found
1 merge request!1Correctly removed counter feature and changed minimal-app to inventory-app,...
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
Showing
with 12 additions and 23 deletions
File moved
{ {
"name": "@unlsoft/minimal-app", "name": "@unlsoft/inventory-app",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@unlsoft/minimal-app", "name": "@unlsoft/inventory-app",
"version": "1.0.0", "version": "1.0.0",
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
{ {
"name": "@unlsoft/minimal-app", "name": "@unlsoft/inventory-app",
"version": "1.0.0", "version": "1.0.0",
"description": "A minimal app to be used as starter code for labs and homework.", "description": "A store/ordering based app that adds items into the users inventory.",
"private": true, "private": true,
"license": "UNLICENSED", "license": "UNLICENSED",
"scripts": { "scripts": {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<meta <meta
name="description" name="description"
content="A minimal app to be used as starter code for labs and homework." content="A store/ordering based app that adds items into the users inventory."
/> />
<meta name="theme-color" content="#d00000" /> <meta name="theme-color" content="#d00000" />
<link rel="icon" href="%PUBLIC_URL%/logo.png" /> <link rel="icon" href="%PUBLIC_URL%/logo.png" />
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" />
<link rel="apple-touch-startup-image" href="%PUBLIC_URL%/logo.png" /> <link rel="apple-touch-startup-image" href="%PUBLIC_URL%/logo.png" />
<link rel="apple-touch-startup-image" href="%PUBLIC_URL%/logo.svg" /> <link rel="apple-touch-startup-image" href="%PUBLIC_URL%/logo.svg" />
<title>Minimal React Redux App</title> <title>Inventory Ordering App</title>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
......
File moved
File moved
{ {
"short_name": "Minimal App", "short_name": "Inventory App",
"name": "Minimal React Redux App", "name": "Inventory Ordering App",
"description": "A minimal app to be used as starter code for labs and homework.", "description": "A store/ordering based app that adds items into the users inventory.",
"icons": [ "icons": [
{ {
"src": "logo.svg", "src": "logo.svg",
......
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`the app has one labeled button that displays the value from the store 1`] = ` exports[`the app has one labeled button that displays the value from the store 1`] = `<div />`;
<div>
<label>
Taps
:
<button
class="blue"
>
9999
</button>
</label>
</div>
`;
import { Routes, Route } from 'react-router-dom'; import { Routes, Route } from 'react-router-dom';
import { Counter } from './features/counter/counter.js';
export function App() { export function App() {
const page = const page =
<> <>
<Counter label={'Taps'} />
</>; </>;
return ( return (
<Routes> <Routes>
......
...@@ -4,16 +4,8 @@ import { MemoryRouter as Router } from 'react-router-dom'; ...@@ -4,16 +4,8 @@ import { MemoryRouter as Router } from 'react-router-dom';
import { App } from './app.js'; import { App } from './app.js';
import {
selectValue,
} from './features/counter/counterSlice.js';
jest.mock('./features/counter/counterSlice.js', () => ({
selectValue: jest.fn().mockName('selectValue'),
}));
describe('the app', () => { describe('the app', () => {
test('has one labeled button that displays the value from the store', () => { test('has one labeled button that displays the value from the store', () => {
selectValue.mockReturnValue(9999);
const { container } = render( const { container } = render(
<Router initialEntries={['/']}> <Router initialEntries={['/']}>
<App /> <App />
......
import { configureStore } from '@reduxjs/toolkit'; import { configureStore } from '@reduxjs/toolkit';
import counterSlice from '../features/counter/counterSlice.js';
export const store = configureStore({ export const store = configureStore({
reducer: { reducer: {
[counterSlice.name]: counterSlice.reducer,
}, },
}); });
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment