From 579cb943cc997c8bd3db120ba0ff65aaeb8d186f Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Fri, 29 Nov 2019 08:52:58 +0300 Subject: [PATCH] Reflecion of #589 --- .../testingandquality/3-parts-in-name.russian.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sections/testingandquality/3-parts-in-name.russian.md b/sections/testingandquality/3-parts-in-name.russian.md index 8c3feb81..5337a84f 100644 --- a/sections/testingandquality/3-parts-in-name.russian.md +++ b/sections/testingandquality/3-parts-in-name.russian.md @@ -17,10 +17,10 @@ ### Пример кода: имя теста, состоящее из 3 частей ```javascript //1. unit under test -describe('Products Service', function() { - describe('Add new product', function() { +describe('Products Service', () => { + describe('Add new product', () => { //2. scenario and 3. expectation - it('When no price is specified, then the product status is pending approval', ()=> { + it('When no price is specified, then the product status is pending approval', () => { const newProduct = new ProductService().add(...); expect(newProduct.status).to.equal('pendingApproval'); }); @@ -32,9 +32,9 @@ describe('Products Service', function() { ### Пример кода - Антипаттерн: нужно прочитать весь тестовый код, чтобы понять намерение ```javascript -describe('Products Service', function() { - describe('Add new product', function() { - it('Should return the right status', ()=> { +describe('Products Service', () => { + describe('Add new product', () => { + it('Should return the right status', () => { //hmm, what is this test checking? what are the scenario and expectation? const newProduct = new ProductService().add(...); expect(newProduct.status).to.equal('pendingApproval');