Merge pull request #1679 from leviding/patch-1

fix: type error of 1-js/03-code-quality/05-testing-mocha/article.md
This commit is contained in:
Alexey Pyltsyn 2019-12-19 23:12:59 +03:00 committed by GitHub
commit 213c6c62b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,8 +159,8 @@ We can select one of two ways to organize the test here:
assert.equal(pow(2, 3), 8);
});
it("3 raised to power 3 is 27", function() {
assert.equal(pow(3, 3), 27);
it("3 raised to power 4 is 81", function() {
assert.equal(pow(3, 4), 81);
});
});
@ -182,7 +182,7 @@ The result:
[iframe height=250 src="pow-2" edit border="1"]
As we could expect, the second test failed. Sure, our function always returns `8`, while the `assert` expects `27`.
As we could expect, the second test failed. Sure, our function always returns `8`, while the `assert` expects `81`.
## Improving the implementation