Skip to content

Commit a765b36

Browse files
Merge pull request #5033 from Prateek93a/update-unit-testing-doc
Update unit_testing.md
2 parents 396907d + a8abe64 commit a765b36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contributor_docs/unit_testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If you have to add a test file for a module to `test/unit`, then you'll also nee
7878

7979
### Writing Unit Tests
8080

81-
Pick a unit, it can be a method or a variable to test. Lets use `p5.prototype.isKeyPressed` as an example. Before beginning to write tests, we need to understand the expected behaviour of this method.
81+
Pick a unit, it can be a method or a variable to test. Lets use `p5.prototype.keyIsPressed` as an example. Before beginning to write tests, we need to understand the expected behaviour of this method.
8282
**Expected behaviour:** The boolean system variable should be true if any key is pressed and false if no keys are pressed.
8383
Now you can think of various tests against this expected behaviour. Possible test cases could be:
8484

@@ -89,7 +89,7 @@ Now you can think of various tests against this expected behaviour. Possible tes
8989
- it should be false if no keys are pressed
9090
- if you can think of more, go ahead and add tests for them!
9191

92-
We can create a test suite for `p5.prototype.isKeyPressed` and start creating tests for it. We will use mocha for structuring our unit tests.
92+
We can create a test suite for `p5.prototype.keyIsPressed` and start creating tests for it. We will use mocha for structuring our unit tests.
9393

9494
```
9595
suite('p5.prototype.keyIsPressed', function() {

0 commit comments

Comments
 (0)