Skip to content

Commit e5793f6

Browse files
authored
Add initial unit tests for statuses object (#65)
* Add initial tests to ensure statuses are in order and there no duplicates
1 parent e575097 commit e5793f6

File tree

10 files changed

+14932
-45
lines changed

10 files changed

+14932
-45
lines changed

.babelrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
{
3+
"presets": ["next/babel", "@babel/preset-typescript"]
4+
5+
}
6+

.github/workflows/test.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# For all PRs, this workflow will
2+
# - Install deps
3+
# - Test
4+
name: CI
5+
6+
on:
7+
# will run on all PRs that are opened or updated (synchronized)
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
test:
13+
name: Test
14+
runs-on: ubuntu-latest
15+
env:
16+
CI: true
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js 13.x
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: 13.x
23+
- name: Install Dependencies
24+
run: npm install
25+
26+
- name: Test
27+
run: npm run test

components/disclaimer.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import styles from "./disclaimer.module.css";
2+
import React from "react"
23

34
export default function Disclaimer() {
45
return (
5-
<>
6+
<React.Fragment>
67
<p className={styles.disclaimer}>
78
Images are used on this site for educational purposes only.
89
</p>
9-
</>
10+
</React.Fragment>
1011
);
1112
}

components/header.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import styles from "./header.module.css";
2+
import React from "react"
23

34
export default function Header() {
45
return (
5-
<>
6+
<React.Fragment>
67
<h1 className={styles.heading}>
78
HTT<span className={styles.accent}>RIRI</span>
89
</h1>
910
<p className={styles.subheading}>
1011
Explore HTTP status codes with this collection of Rihanna GIFs
1112
</p>
12-
</>
13+
</React.Fragment>
1314
);
1415
}

0 commit comments

Comments
 (0)