Skip to content

Commit 6f0acf8

Browse files
committed
new API that can be inspected with Postman
1 parent 9d979a3 commit 6f0acf8

21 files changed

+19600
-14716
lines changed

.eslintrc.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"node": true,
66
"jest": true
77
},
8-
"extends": "eslint:recommended",
8+
"extends": [
9+
"eslint:recommended"
10+
],
911
"parserOptions": {
12+
"ecmaFeatures": {},
1013
"ecmaVersion": 12,
1114
"sourceType": "module"
1215
},
13-
"rules": {
14-
}
16+
"rules": {}
1517
}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77
lerna-debug.log*
8+
.pnpm-debug.log*
89

910
# Diagnostic reports (https://nodejs.org/api/report.html)
1011
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -71,6 +72,7 @@ web_modules/
7172
# dotenv environment variables file
7273
.env
7374
.env.test
75+
.env.production
7476

7577
# parcel-bundler cache (https://parceljs.org/)
7678
.cache
@@ -82,8 +84,7 @@ out
8284

8385
# Nuxt.js build / generate output
8486
.nuxt
85-
dist/*
86-
!dist/mockServiceWorker.js
87+
dist
8788

8889
# Gatsby files
8990
.cache/

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,24 @@ In meeting the minimum viable product (MVP) specifications listed below, your pr
3333
- [ ] Navigate to the root of the project with your command line.
3434
- [ ] Run `npm install` to download the dependencies listed in the `package.json` file.
3535
- [ ] Run `npm start` to compile the project and serve it.
36-
- [ ] Navigate Chrome to the URL indicated in the output of the `npm start` command.
36+
- [ ] Navigate Chrome to `http://localhost:3000`
3737
- [ ] In a separate terminal, run `npm test` to run tests.
3838

3939
**Steps Required for MVP:**
4040

41-
- [ ] Step 0 is to link `src/index.js` to the `src/index.html` file using a script tag.
4241
- [ ] Steps 1 and 2 are explained inside the `src/components/header.js` file.
4342
- [ ] Steps 3 and 4 are explained inside the `src/components/tabs.js` file.
4443
- [ ] Steps 5 and 6 are explained inside the `src/components/card.js` file.
4544

4645
**Important Notes:**
4746

4847
- Please **do not move or rename existing files** or folders.
49-
- Careful adding your script tag in Step 0: the code inside `index.js` needs the DOM to be fully built before executing.
50-
- Careful if you choose to install Axios using another script tag: the order in which script tags execute is important.
5148
- If your development server stops "auto reloading", manually kill it with `CTRL+C` and restart it.
5249
- Do not change the `package.json` file except to install libraries with NPM (Axios is _already_ in the `package.json`).
5350
- In your solution, it is essential that you follow best practices and produce clean and professional results.
5451
- Schedule time to review, refine, and polish your work, including spell-checking and grammar-checking.
5552
- It is better to submit a challenge that meets MVP than one that attempts too much and does not.
5653

57-
**Stretch Goals:**
58-
59-
**IMPORTANT:** Work on stretch goals in a **new branch**. You can branch off of `<firstName-lastName>` by executing `git checkout -b stretch`.
60-
61-
After finishing your required elements, you can push your work further. These goals may or may not be things you have learned in this module but they build on the material you just studied. Time allowing, stretch your limits and see if you can deliver on the following optional goals:
62-
63-
- [ ] Use the tabs at the top of the page to filter articles by topic.
64-
6554
## Submission format
6655

6756
- [ ] Submit via Codegrade by committing and pushing any new changes.

babel.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module.exports = {
22
env: {
3-
test: {
3+
testing: { // matches the `NODE_ENV=testing` in "test" script in package.json
4+
plugins: [
5+
'@babel/plugin-transform-runtime',
6+
],
47
presets: [
58
[
69
'@babel/preset-env',

codegrade_mvp.test.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import 'regenerator-runtime'
21
import '@testing-library/jest-dom/extend-expect'
3-
import fetch from 'node-fetch'
4-
import axios from 'axios'
5-
6-
globalThis.fetch = fetch
7-
globalThis.axios = axios
8-
92
import { server } from './src/mocks/server'
103
import { screen, queries } from '@testing-library/dom'
114
import { articles, topics } from './src/mocks/data'

0 commit comments

Comments
 (0)