-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50bca94
commit 7dd6173
Showing
2 changed files
with
32 additions
and
0 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,21 @@ | ||
import { add, substract } from "./add"; | ||
|
||
describe("add function", () => { | ||
it("should add two positive numbers correctly", () => { | ||
// 1. | ||
// Start typing below and autocomplete should suggest a valid test, | ||
// noting that the model correctly tests the 'add' function based | ||
// on the title of the test that is provided as context | ||
}); | ||
|
||
// 2. | ||
// Using cmd + I, ask for a more specific test of the substract function. | ||
// | ||
// Prompt: "Create a new unit test for the subtract function, verifying that it can handle negative numbers correctly." | ||
|
||
// 3. | ||
// Go into 'add.ts' and uncomment the 'multiply' function. | ||
// Then, return to this file, highlight the entire file, add to chat, use the `/edit` cmd, and ask to update the tests to include the new function. | ||
// | ||
// Prompt: "/edit Update the tests to include the new 'multiply' function." | ||
}); |
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,11 @@ | ||
export function add(first: number, second: number): number { | ||
return first + second; | ||
} | ||
|
||
export function substract(first: number, second: number): number { | ||
return first - second; | ||
} | ||
|
||
// export function multiply(first: number, second: number): number { | ||
// return first * second; | ||
// } |