up
This commit is contained in:
parent
4ae129054e
commit
ab9ab64bd5
476 changed files with 3370 additions and 532 deletions
|
@ -0,0 +1,24 @@
|
|||
importance: 5
|
||||
|
||||
---
|
||||
|
||||
# What's wrong in the test?
|
||||
|
||||
What's wrong in the test of `pow` below?
|
||||
|
||||
```js
|
||||
it("Raises x to the power n", function() {
|
||||
let x = 5;
|
||||
|
||||
let result = x;
|
||||
assert.equal(pow(x, 1), result);
|
||||
|
||||
result *= x;
|
||||
assert.equal(pow(x, 2), result);
|
||||
|
||||
result *= x;
|
||||
assert.equal(pow(x, 3), result);
|
||||
});
|
||||
```
|
||||
|
||||
P.S. Syntactically it's correct and passes.
|
Loading…
Add table
Add a link
Reference in a new issue