Skip to content
Snippets Groups Projects
Commit 0a472f53 authored by lokmeinmatz's avatar lokmeinmatz
Browse files

fixed jest and prettier errors, pipeline uses correct caching

parent f812d9bf
No related branches found
No related tags found
No related merge requests found
...@@ -6,16 +6,18 @@ stages: ...@@ -6,16 +6,18 @@ stages:
# - deploy # - deploy
cache: cache:
key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- node_modules/ - .npm/
install_dependencies: install_dependencies:
stage: build stage: build
script: script:
- npm install - npm ci --cache .npm --prefer-offline
artifacts: artifacts:
paths: paths:
- node_modules/ - node_modules/
expire_in: 1 week
testing_jest: testing_jest:
stage: test stage: test
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
"eject": "react-scripts eject", "eject": "react-scripts eject",
"lint": "eslint . -c .eslint-rc.js", "lint": "eslint . -c .eslint-rc.js",
"lint-fix": "eslint . -c .eslint-rc.js --fix", "lint-fix": "eslint . -c .eslint-rc.js --fix",
"prettier-check": "prettier --check ." "prettier-check": "prettier --check .",
"prettier-write": "prettier --write ."
}, },
"eslintConfig": { "eslintConfig": {
"extends": "react-app" "extends": "react-app"
......
...@@ -2,7 +2,7 @@ import React from 'react' ...@@ -2,7 +2,7 @@ import React from 'react'
import { render } from '@testing-library/react' import { render } from '@testing-library/react'
import { Provider } from 'react-redux' import { Provider } from 'react-redux'
import { store } from './redux/store' import { store } from './redux/store'
import App from './App' import App from './components/App'
test('renders learn react link', () => { test('renders learn react link', () => {
const { getByText } = render( const { getByText } = render(
......
import React, { Suspense } from 'react' import React, { Suspense } from 'react'
import { import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
BrowserRouter as Router, import UserHome from './user/homeComponent'
Switch,
Route,
} from "react-router-dom";
import UserHome from "./user/homeComponent";
const AdminComponent = React.lazy(() => import('./admin')) const AdminComponent = React.lazy(() => import('./admin'))
......
import React from 'react'; import React from 'react'
const AdminHome = () => { const AdminHome = () => {
return (<div>Placeholder for Admin Interface</div>) return <div>Placeholder for Admin Interface</div>
} }
export default AdminHome; export default AdminHome
\ No newline at end of file
import React from 'react'; import React from 'react'
const UserHome = () => { const UserHome = () => {
return (<div>Placeholder for the page that will allow the user to start the quiz</div>) return (
<div>
Placeholder for the page that will allow the user to start the quiz
</div>
)
} }
export default UserHome; export default UserHome
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment