up
This commit is contained in:
parent
4ae129054e
commit
ab9ab64bd5
476 changed files with 3370 additions and 532 deletions
19
1-js/03-code-quality/05-testing-mocha/pow-4.view/test.js
Normal file
19
1-js/03-code-quality/05-testing-mocha/pow-4.view/test.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
describe("pow", function() {
|
||||
|
||||
describe("raises x to power n", function() {
|
||||
|
||||
function makeTest(x) {
|
||||
let expected = x * x * x;
|
||||
it(`${x} in the power 3 is ${expected}`, function() {
|
||||
assert.equal(pow(x, 3), expected);
|
||||
});
|
||||
}
|
||||
|
||||
for (let x = 1; x <= 5; x++) {
|
||||
makeTest(x);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// ... more tests to follow here, both describe and it can be added
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue