-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[finishes 187511688]-implement-badges-status(CI/CD)-show-whether-pass…
…ed-or-failed
- Loading branch information
Showing
7 changed files
with
45 additions
and
1 deletion.
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,2 @@ | ||
service_name: "github" | ||
repo_token: $COVERALLS_REPO_TOKEN |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,10 @@ jobs: | |
DB_USER: ${{ secrets.DEV_DB_USER }} | ||
DB_PASSWORD: ${{ secrets.DEV_DB_PASSWORD }} | ||
DB_HOST: ${{ secrets.DEV_DB_HOST }} | ||
- name: Send Coverage to Coveralls | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
build: | ||
name: Build | ||
|
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
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,3 @@ | ||
export function addition(a: number, b: number) { | ||
return a + b; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,21 @@ | ||
import { addition } from '../controllers/testController'; | ||
|
||
test('Adding 2 and 1 equals 3', () => { | ||
expect(2 + 1).toBe(3); | ||
}); | ||
test('Addition function adds two numbers correctly', () => { | ||
// Test case 1: Testing addition of positive numbers | ||
expect(addition(2, 3)).toBe(5); // Expected result: 2 + 3 = 5 | ||
|
||
// Test case 2: Testing addition of negative numbers | ||
expect(addition(-2, -3)).toBe(-5); // Expected result: -2 + (-3) = -5 | ||
|
||
// Test case 3: Testing addition of a positive and a negative number | ||
expect(addition(5, -3)).toBe(2); // Expected result: 5 + (-3) = 2 | ||
|
||
// Test case 4: Testing addition of zero and a number | ||
expect(addition(0, 7)).toBe(7); // Expected result: 0 + 7 = 7 | ||
|
||
// Test case 5: Testing addition of a number and zero | ||
expect(addition(4, 0)).toBe(4); // Expected result: 4 + 0 = 4 | ||
}); |