en.javascript.info/1-js/03-code-quality/05-testing-mocha/3-pow-test-wrong/task.md
Ilya Kantor 0fcf9f84fa fixes
2017-03-24 17:28:37 +03:00

24 lines
369 B
Markdown

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 the test is correct and passes.