Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add translations to test.js files used in test with mocha section
  • Loading branch information
alexgalkin committed Mar 4, 2020
commit c301cac214f297423dec1abf73f6d1fedb887b67
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
describe("test", function() {

before(() => alert("Testing started – before all tests"));
after(() => alert("Testing finished – after all tests"));
before(() => alert("Тестування розпочато – перед усіма тестами"));
after(() => alert("Тестування завершено – після всіх тестів"));

beforeEach(() => alert("Before a test – enter a test"));
afterEach(() => alert("After a test – exit a test"));
beforeEach(() => alert("Перед тестом – початок тесту"));
afterEach(() => alert("Після тесту – вихід з тесту"));

it('test 1', () => alert(1));
it('test 2', () => alert(2));
Expand Down
2 changes: 1 addition & 1 deletion 1-js/03-code-quality/05-testing-mocha/pow-1.view/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("pow", function() {

it("raises to n-th power", function() {
it("підносить до n-нного степеня", function() {
assert.equal(pow(2, 3), 8);
});

Expand Down
4 changes: 2 additions & 2 deletions 1-js/03-code-quality/05-testing-mocha/pow-2.view/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
describe("pow", function() {

it("2 raised to power 3 is 8", function() {
it("2 піднесене до степеня 3 дорівнює 8", function() {
assert.equal(pow(2, 3), 8);
});

it("3 raised to power 4 is 81", function() {
it("3 піднесене до степеня 4 дорівнює 81", function() {
assert.equal(pow(3, 4), 81);
});

Expand Down
2 changes: 1 addition & 1 deletion 1-js/03-code-quality/05-testing-mocha/pow-3.view/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe("pow", function() {

function makeTest(x) {
let expected = x * x * x;
it(`${x} in the power 3 is ${expected}`, function() {
it(`${x} піднесене до степеня 3 дорівнює ${expected}`, function() {
assert.equal(pow(x, 3), expected);
});
}
Expand Down
6 changes: 3 additions & 3 deletions 1-js/03-code-quality/05-testing-mocha/pow-4.view/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
describe("pow", function() {

describe("raises x to power 3", function() {
describe("підносить x до степеня 3", function() {

function makeTest(x) {
let expected = x * x * x;
it(`${x} in the power 3 is ${expected}`, function() {
it(`${x} піднесене до степеня 3 дорівнює ${expected}`, function() {
assert.equal(pow(x, 3), expected);
});
}
Expand All @@ -15,5 +15,5 @@ describe("pow", function() {

});

// ... more tests to follow here, both describe and it can be added
// ... тут можна додати більше тестів з "describe" та "it"
});
8 changes: 4 additions & 4 deletions 1-js/03-code-quality/05-testing-mocha/pow-full.view/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
describe("pow", function() {

describe("raises x to power 3", function() {
describe("підносить x до степеня 3", function() {

function makeTest(x) {
let expected = x * x * x;
it(`${x} in the power 3 is ${expected}`, function() {
it(`${x} піднесене до степеня 3 дорівнює ${expected}`, function() {
assert.equal(pow(x, 3), expected);
});
}
Expand All @@ -15,11 +15,11 @@ describe("pow", function() {

});

it("if n is negative, the result is NaN", function() {
it("для недійсних n результатом є NaN", function() {
assert.isNaN(pow(2, -1));
});

it("if n is not integer, the result is NaN", function() {
it("для не цілих n результатом є NaN", function() {
assert.isNaN(pow(2, 1.5));
});

Expand Down
2 changes: 1 addition & 1 deletion 1-js/03-code-quality/05-testing-mocha/pow-min.view/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("pow", function() {

it("raises to n-th power", function() {
it("підносить до n-нного степеня", function() {
assert.equal(pow(2, 3), 8);
});

Expand Down
8 changes: 4 additions & 4 deletions 1-js/03-code-quality/05-testing-mocha/pow-nan.view/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
describe("pow", function() {

describe("raises x to power 3", function() {
describe("підносить x до степеня 3", function() {

function makeTest(x) {
let expected = x * x * x;
it(`${x} in the power 3 is ${expected}`, function() {
it(`${x} піднесене до степеня 3 дорівнює ${expected}`, function() {
assert.equal(pow(x, 3), expected);
});
}
Expand All @@ -15,11 +15,11 @@ describe("pow", function() {

});

it("if n is negative, the result is NaN", function() {
it("для недійсних n результатом є NaN", function() {
assert.isNaN(pow(2, -1));
});

it("if n is not integer, the result is NaN", function() {
it("для не цілих n результатом є NaN", function() {
assert.isNaN(pow(2, 1.5));
});

Expand Down