-
-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This PR setup unit tests. ## Checklist Please review and check off the following items before submitting your PR: <!-- If yes then add 'x' into '[ ]' --> - [x] I have tested my changes to ensure they work as expected - [ ] I have included documentation for any new features or changes - [x] I have formatted my code according to the project's style guidelines - [x] I have written tests for any new features or changes - [x] I have run the project's test suite and verified that all tests pass - [ ] I have updated the README and any other relevant documentation - [x] I have checked for any spelling or grammatical errors --------- Co-authored-by: Priyankar Pal <[email protected]>
- Loading branch information
1 parent
0732476
commit 5c127ee
Showing
13 changed files
with
1,083 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install nodejs | ||
curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | PNPM_VERSION=6.16.0 node | ||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Run Tests | ||
run: pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, expect, test } from "vitest" | ||
import { screen, render } from "@testing-library/react" | ||
import AddYourProjectsGuide from "../../src/pages/AddYourProjectsGuide" | ||
|
||
describe("Projects Guide page test", () => { | ||
test("Should render Projects Guide Page", () => { | ||
render(<AddYourProjectsGuide />) | ||
expect(screen.getByText(/Follow these steps to add your projects/i)).toBeTruthy() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, expect, test } from "vitest" | ||
import { screen, render } from "@testing-library/react" | ||
import ContributorsPage from "../../src/pages/ContributorsPage" | ||
|
||
describe("Contributors Page test", () => { | ||
test("Should render Contributors Page", () => { | ||
render(<ContributorsPage />) | ||
expect(screen.getByText(/Contributors/i)).toBeTruthy() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { describe, expect, test } from "vitest" | ||
import { screen, render } from "@testing-library/react" | ||
import { BrowserRouter as Router } from "react-router-dom" | ||
import HomePage from "../../src/pages/HomePage" | ||
|
||
describe("HomePage test", () => { | ||
test("Should render Home Page", () => { | ||
render( | ||
<Router> | ||
<HomePage /> | ||
</Router>, | ||
) | ||
expect(screen.getByText(/Show your project to the world/i)).toBeTruthy() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5c127ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
projectshut – ./
projectshut-priyankarpal.vercel.app
projectshut.vercel.app
projectshut-git-main-priyankarpal.vercel.app