-
-
Notifications
You must be signed in to change notification settings - Fork 337
Birmingham | ITP-Jan | Ahmad Roman Sanaye | Sprint 3 | Implement functions and rewrite tests #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f960b94
773ddc9
fc8717b
9d4539d
694f1cf
10c6347
431a4ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,18 @@ const isProperFraction = require("../implement/2-is-proper-fraction"); | |
| test(`should return false when denominator is zero`, () => { | ||
| expect(isProperFraction(1, 0)).toEqual(false); | ||
| }); | ||
| test(`should return false when denominator is less than numerator`, () => { | ||
| expect(isProperFraction(2, 1)).toEqual(false); | ||
| }); | ||
| test("should return false when numerator is zero", ()=>{ | ||
| expect(isProperFraction(0, 1)).toEqual(false); | ||
| }); | ||
| test("should return false when numerator is a negative number", ()=>{ | ||
| expect(isProperFraction(-2, 2)).toEqual(false); | ||
| }); | ||
| test("should return false when denominator is a negative number", ()=>{ | ||
| expect(isProperFraction(2, -2)).toEqual(false); | ||
| }); | ||
| test("should return false where both numerator and denominator are negative numbers", ()=> { | ||
| expect(isProperFraction(-3, -4)).toEqual(false); | ||
| }) | ||
|
Comment on lines
+11
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this file? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| acoursework/sprint-2[m | ||
| acoursework/sprint-2-clean[m | ||
| coursework/sprint-1[m | ||
| * [32mcoursework/sprint-3-implement-and-rewrite[m | ||
| main[m |
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.
If you have successfully enabled "Format on save", and setup Prettier as your the default formatter in VSCode,
the formatter should have added a space between
}andelse, betweenifand(, and between)and{.If you have enabled "Format on save" but it is not working, it is likely that you haven't assign a formatter for JS file. This could happen if you have zero or multiple extensions that can format .js file.
If you have installed "Prettier" extension. To assign it as the formatter of JS code, you can try:
settings.jsonand set Prettier as the default formatter for JS.See: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode