From 4e0ba5b17da3c4c2d69e8c289e86b8d777b3d985 Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Thu, 2 Jul 2026 17:04:21 +0500 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D1=8B=20=D1=81?= =?UTF-8?q?=D1=82=D1=83=D0=B4=D0=B5=D0=BD=D1=82=D0=B0=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D0=B8=20=C2=AB=D0=B2=D1=8B=D0=B2?= =?UTF-8?q?=D0=BE=D0=B4=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Тесты выводных уроков глушили console.log студента строкой vi.spyOn(console, 'log').mockImplementation(() => {}): вызовы писались в spy.mock.calls (поэтому assert работал и задание засчитывалось), но настоящей печати не было — на панели «вывод» студент своего результата не видел. Сняли .mockImplementation(() => {}) в 44 test.js — шпион теперь и записывает вызовы (assert цел), и вызывает настоящий console.log. Добавили disableConsoleIntercept: true в vitest.config.js, чтобы вывод шёл в stdout чисто, без служебного префикса vitest (stdout | test.js > ...). Это прямой аналог pytest --capture=no из фикса Python. Невыводные уроки (проверяют возвращаемое значение) и 10-basics/20-comments не менялись. Co-Authored-By: Claude Opus 4.8 (1M context) --- modules/10-basics/10-hello-world/test.js | 2 +- modules/10-basics/40-instructions/test.js | 2 +- modules/10-basics/45-testing/test.js | 2 +- modules/10-basics/50-syntax-errors/test.js | 2 +- modules/20-arithmetics/20-basic/test.js | 2 +- modules/20-arithmetics/25-operator/test.js | 2 +- modules/20-arithmetics/27-commutativity/test.js | 2 +- modules/20-arithmetics/30-composition/test.js | 2 +- modules/20-arithmetics/40-priority/test.js | 2 +- modules/20-arithmetics/50-float/test.js | 2 +- modules/20-arithmetics/60-infinity/test.js | 2 +- modules/20-arithmetics/70-nan/test.js | 2 +- modules/20-arithmetics/80-linting/test.js | 2 +- modules/25-strings/10-quotes/test.js | 2 +- modules/25-strings/15-escape-characters/test.js | 2 +- modules/25-strings/20-string-concatenation/test.js | 2 +- modules/25-strings/30-encoding/test.js | 2 +- modules/30-variables/10-definition/test.js | 2 +- modules/30-variables/11-change/test.js | 2 +- modules/30-variables/13-variables-naming/test.js | 2 +- modules/30-variables/15-variables-expressions/test.js | 2 +- modules/30-variables/18-variable-concatenation/test.js | 2 +- modules/30-variables/19-naming-style/test.js | 2 +- modules/30-variables/20-magic-numbers/test.js | 2 +- modules/30-variables/23-constants/test.js | 2 +- modules/31-advanced-strings/25-interpolation/test.js | 2 +- modules/31-advanced-strings/30-symbols/test.js | 2 +- modules/31-advanced-strings/70-slices/test.js | 2 +- modules/31-advanced-strings/90-multiline-strings/test.js | 2 +- modules/33-data-types/10-primitive-data-types/test.js | 2 +- modules/33-data-types/45-undefined/test.js | 2 +- modules/33-data-types/50-data-types-weak-typing/test.js | 2 +- modules/33-data-types/52-data-types-immutability/test.js | 2 +- modules/33-data-types/55-data-types-casting/test.js | 2 +- modules/35-calling-functions/100-call/test.js | 2 +- .../135-calling-functions-default-params/test.js | 2 +- .../150-calling-functions-expression/test.js | 2 +- modules/35-calling-functions/180-variadic-parameters/test.js | 2 +- modules/35-calling-functions/270-deterministic/test.js | 2 +- modules/38-objects/100-objects/test.js | 2 +- modules/38-objects/200-methods-immutability/test.js | 2 +- modules/38-objects/500-method-chain/test.js | 2 +- modules/40-define-functions/100-define-function/test.js | 2 +- modules/50-loops/10-while/test.js | 2 +- vitest.config.js | 1 + 45 files changed, 45 insertions(+), 44 deletions(-) diff --git a/modules/10-basics/10-hello-world/test.js b/modules/10-basics/10-hello-world/test.js index 508ef4cf..41612173 100644 --- a/modules/10-basics/10-hello-world/test.js +++ b/modules/10-basics/10-hello-world/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/10-basics/40-instructions/test.js b/modules/10-basics/40-instructions/test.js index 5d4beef8..83e3b408 100644 --- a/modules/10-basics/40-instructions/test.js +++ b/modules/10-basics/40-instructions/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/10-basics/45-testing/test.js b/modules/10-basics/45-testing/test.js index 7fce79c4..124ac3e7 100644 --- a/modules/10-basics/45-testing/test.js +++ b/modules/10-basics/45-testing/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/10-basics/50-syntax-errors/test.js b/modules/10-basics/50-syntax-errors/test.js index e2c9e32d..a41c22fb 100644 --- a/modules/10-basics/50-syntax-errors/test.js +++ b/modules/10-basics/50-syntax-errors/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/20-basic/test.js b/modules/20-arithmetics/20-basic/test.js index 61415271..b5bdee5a 100644 --- a/modules/20-arithmetics/20-basic/test.js +++ b/modules/20-arithmetics/20-basic/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/25-operator/test.js b/modules/20-arithmetics/25-operator/test.js index 7062e1d8..afd97ffe 100644 --- a/modules/20-arithmetics/25-operator/test.js +++ b/modules/20-arithmetics/25-operator/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/27-commutativity/test.js b/modules/20-arithmetics/27-commutativity/test.js index 87594ee2..492330e2 100644 --- a/modules/20-arithmetics/27-commutativity/test.js +++ b/modules/20-arithmetics/27-commutativity/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/30-composition/test.js b/modules/20-arithmetics/30-composition/test.js index 649e45e0..74d0ff25 100644 --- a/modules/20-arithmetics/30-composition/test.js +++ b/modules/20-arithmetics/30-composition/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/40-priority/test.js b/modules/20-arithmetics/40-priority/test.js index 75928021..fc32d991 100644 --- a/modules/20-arithmetics/40-priority/test.js +++ b/modules/20-arithmetics/40-priority/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/50-float/test.js b/modules/20-arithmetics/50-float/test.js index faa2a296..ddda4ff0 100644 --- a/modules/20-arithmetics/50-float/test.js +++ b/modules/20-arithmetics/50-float/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/60-infinity/test.js b/modules/20-arithmetics/60-infinity/test.js index 37a00da7..fb529602 100644 --- a/modules/20-arithmetics/60-infinity/test.js +++ b/modules/20-arithmetics/60-infinity/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/70-nan/test.js b/modules/20-arithmetics/70-nan/test.js index c5858540..ea36893c 100644 --- a/modules/20-arithmetics/70-nan/test.js +++ b/modules/20-arithmetics/70-nan/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/20-arithmetics/80-linting/test.js b/modules/20-arithmetics/80-linting/test.js index 60e9ceba..c7c96446 100644 --- a/modules/20-arithmetics/80-linting/test.js +++ b/modules/20-arithmetics/80-linting/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/25-strings/10-quotes/test.js b/modules/25-strings/10-quotes/test.js index ac4a9568..0cd15688 100644 --- a/modules/25-strings/10-quotes/test.js +++ b/modules/25-strings/10-quotes/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/25-strings/15-escape-characters/test.js b/modules/25-strings/15-escape-characters/test.js index 8503b970..748debf6 100644 --- a/modules/25-strings/15-escape-characters/test.js +++ b/modules/25-strings/15-escape-characters/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/25-strings/20-string-concatenation/test.js b/modules/25-strings/20-string-concatenation/test.js index 2dcdd835..fda4d445 100644 --- a/modules/25-strings/20-string-concatenation/test.js +++ b/modules/25-strings/20-string-concatenation/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/25-strings/30-encoding/test.js b/modules/25-strings/30-encoding/test.js index 67454de5..b82695ea 100644 --- a/modules/25-strings/30-encoding/test.js +++ b/modules/25-strings/30-encoding/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/10-definition/test.js b/modules/30-variables/10-definition/test.js index 3ebe0104..e71f0074 100644 --- a/modules/30-variables/10-definition/test.js +++ b/modules/30-variables/10-definition/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/11-change/test.js b/modules/30-variables/11-change/test.js index 7d69186d..131314df 100644 --- a/modules/30-variables/11-change/test.js +++ b/modules/30-variables/11-change/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/13-variables-naming/test.js b/modules/30-variables/13-variables-naming/test.js index d8ee3367..183398a4 100644 --- a/modules/30-variables/13-variables-naming/test.js +++ b/modules/30-variables/13-variables-naming/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/15-variables-expressions/test.js b/modules/30-variables/15-variables-expressions/test.js index 8b57a1f8..eae8b280 100644 --- a/modules/30-variables/15-variables-expressions/test.js +++ b/modules/30-variables/15-variables-expressions/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/18-variable-concatenation/test.js b/modules/30-variables/18-variable-concatenation/test.js index 60501131..ca01aa15 100644 --- a/modules/30-variables/18-variable-concatenation/test.js +++ b/modules/30-variables/18-variable-concatenation/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/19-naming-style/test.js b/modules/30-variables/19-naming-style/test.js index 531f816c..3e623485 100644 --- a/modules/30-variables/19-naming-style/test.js +++ b/modules/30-variables/19-naming-style/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/20-magic-numbers/test.js b/modules/30-variables/20-magic-numbers/test.js index d6107692..4fa960e4 100644 --- a/modules/30-variables/20-magic-numbers/test.js +++ b/modules/30-variables/20-magic-numbers/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/30-variables/23-constants/test.js b/modules/30-variables/23-constants/test.js index eed7e65b..acdbbe80 100644 --- a/modules/30-variables/23-constants/test.js +++ b/modules/30-variables/23-constants/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/31-advanced-strings/25-interpolation/test.js b/modules/31-advanced-strings/25-interpolation/test.js index 15c7e9dc..36679ba2 100644 --- a/modules/31-advanced-strings/25-interpolation/test.js +++ b/modules/31-advanced-strings/25-interpolation/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/31-advanced-strings/30-symbols/test.js b/modules/31-advanced-strings/30-symbols/test.js index 98ebac04..afb53327 100644 --- a/modules/31-advanced-strings/30-symbols/test.js +++ b/modules/31-advanced-strings/30-symbols/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/31-advanced-strings/70-slices/test.js b/modules/31-advanced-strings/70-slices/test.js index c4feaafa..95234812 100644 --- a/modules/31-advanced-strings/70-slices/test.js +++ b/modules/31-advanced-strings/70-slices/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/31-advanced-strings/90-multiline-strings/test.js b/modules/31-advanced-strings/90-multiline-strings/test.js index 629dab97..04c50006 100644 --- a/modules/31-advanced-strings/90-multiline-strings/test.js +++ b/modules/31-advanced-strings/90-multiline-strings/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/33-data-types/10-primitive-data-types/test.js b/modules/33-data-types/10-primitive-data-types/test.js index dd577ec9..453b77a7 100644 --- a/modules/33-data-types/10-primitive-data-types/test.js +++ b/modules/33-data-types/10-primitive-data-types/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/33-data-types/45-undefined/test.js b/modules/33-data-types/45-undefined/test.js index 3c0389a9..ce185511 100644 --- a/modules/33-data-types/45-undefined/test.js +++ b/modules/33-data-types/45-undefined/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('undefined', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); // console.log must be called and must be passed an undefined argument diff --git a/modules/33-data-types/50-data-types-weak-typing/test.js b/modules/33-data-types/50-data-types-weak-typing/test.js index fabeee92..9520c8d4 100644 --- a/modules/33-data-types/50-data-types-weak-typing/test.js +++ b/modules/33-data-types/50-data-types-weak-typing/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/33-data-types/52-data-types-immutability/test.js b/modules/33-data-types/52-data-types-immutability/test.js index 059b7b92..6e8f1260 100644 --- a/modules/33-data-types/52-data-types-immutability/test.js +++ b/modules/33-data-types/52-data-types-immutability/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/33-data-types/55-data-types-casting/test.js b/modules/33-data-types/55-data-types-casting/test.js index 3129b068..3748162c 100644 --- a/modules/33-data-types/55-data-types-casting/test.js +++ b/modules/33-data-types/55-data-types-casting/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/35-calling-functions/100-call/test.js b/modules/35-calling-functions/100-call/test.js index 4d58fb6d..75476f86 100644 --- a/modules/35-calling-functions/100-call/test.js +++ b/modules/35-calling-functions/100-call/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/35-calling-functions/135-calling-functions-default-params/test.js b/modules/35-calling-functions/135-calling-functions-default-params/test.js index a0e60b1d..48a7af3c 100644 --- a/modules/35-calling-functions/135-calling-functions-default-params/test.js +++ b/modules/35-calling-functions/135-calling-functions-default-params/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/35-calling-functions/150-calling-functions-expression/test.js b/modules/35-calling-functions/150-calling-functions-expression/test.js index ac06f6b5..3eab909e 100644 --- a/modules/35-calling-functions/150-calling-functions-expression/test.js +++ b/modules/35-calling-functions/150-calling-functions-expression/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/35-calling-functions/180-variadic-parameters/test.js b/modules/35-calling-functions/180-variadic-parameters/test.js index 4d1b0622..aa132a91 100644 --- a/modules/35-calling-functions/180-variadic-parameters/test.js +++ b/modules/35-calling-functions/180-variadic-parameters/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/35-calling-functions/270-deterministic/test.js b/modules/35-calling-functions/270-deterministic/test.js index 97cd19dd..8e52f740 100644 --- a/modules/35-calling-functions/270-deterministic/test.js +++ b/modules/35-calling-functions/270-deterministic/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/38-objects/100-objects/test.js b/modules/38-objects/100-objects/test.js index 17d0dd7f..9ba59616 100644 --- a/modules/38-objects/100-objects/test.js +++ b/modules/38-objects/100-objects/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/38-objects/200-methods-immutability/test.js b/modules/38-objects/200-methods-immutability/test.js index 771266b8..6fea4306 100644 --- a/modules/38-objects/200-methods-immutability/test.js +++ b/modules/38-objects/200-methods-immutability/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/38-objects/500-method-chain/test.js b/modules/38-objects/500-method-chain/test.js index 8bbdd4d6..0b700f8b 100644 --- a/modules/38-objects/500-method-chain/test.js +++ b/modules/38-objects/500-method-chain/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/40-define-functions/100-define-function/test.js b/modules/40-define-functions/100-define-function/test.js index 6d7d81fe..074fdc2a 100644 --- a/modules/40-define-functions/100-define-function/test.js +++ b/modules/40-define-functions/100-define-function/test.js @@ -4,7 +4,7 @@ import { expect, test, vi } from 'vitest'; import f from './index.js'; test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); f(); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/modules/50-loops/10-while/test.js b/modules/50-loops/10-while/test.js index a03c64f3..fdfb5b82 100644 --- a/modules/50-loops/10-while/test.js +++ b/modules/50-loops/10-while/test.js @@ -4,7 +4,7 @@ import { expect, test, vi } from 'vitest'; import f from './index.js'; test('printNumbers', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log'); f(6); const firstArg = consoleLogSpy.mock.calls.join('\n'); diff --git a/vitest.config.js b/vitest.config.js index f8553da6..65b75437 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -3,5 +3,6 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { include: ['**/*.test.js', '**/*.spec.js', '**/test.js'], + disableConsoleIntercept: true, }, }); From c6a6fc485cd287b7822c4126568d8cbd0593f6e4 Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Thu, 2 Jul 2026 18:08:51 +0500 Subject: [PATCH 2/2] =?UTF-8?q?refactor(tests):=20=D0=B4=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=20=D1=82=D0=B5=D1=81=D1=82-=D0=BA=D0=B5=D0=B9=D1=81=D0=B0?= =?UTF-8?q?=D0=BC=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BC=D0=B5=D1=82=D0=BD=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=20=D1=83=D1=80=D0=BE=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Имя теста в каждом из 71 test.js теперь равно слагу урока (каталог без числового префикса, дефисы → пробелы): 'hello world', 'string concatenation', 'if', 'while', 'define function' и т.д. Раньше было 'hello world' у выводных и разрозненные 'test'/'mirror'/'printNumbers'. Теперь на панели «вывод» заголовок кейса отражает тему урока. Только строка-описание, на assert не влияет. Co-Authored-By: Claude Opus 4.8 (1M context) --- modules/10-basics/40-instructions/test.js | 2 +- modules/10-basics/45-testing/test.js | 2 +- modules/10-basics/50-syntax-errors/test.js | 2 +- modules/20-arithmetics/20-basic/test.js | 2 +- modules/20-arithmetics/25-operator/test.js | 2 +- modules/20-arithmetics/27-commutativity/test.js | 2 +- modules/20-arithmetics/30-composition/test.js | 2 +- modules/20-arithmetics/40-priority/test.js | 2 +- modules/20-arithmetics/50-float/test.js | 2 +- modules/20-arithmetics/60-infinity/test.js | 2 +- modules/20-arithmetics/70-nan/test.js | 2 +- modules/20-arithmetics/80-linting/test.js | 2 +- modules/25-strings/10-quotes/test.js | 2 +- modules/25-strings/15-escape-characters/test.js | 2 +- modules/25-strings/20-string-concatenation/test.js | 2 +- modules/25-strings/30-encoding/test.js | 2 +- modules/30-variables/10-definition/test.js | 2 +- modules/30-variables/11-change/test.js | 2 +- modules/30-variables/13-variables-naming/test.js | 2 +- modules/30-variables/15-variables-expressions/test.js | 2 +- modules/30-variables/18-variable-concatenation/test.js | 2 +- modules/30-variables/19-naming-style/test.js | 2 +- modules/30-variables/20-magic-numbers/test.js | 2 +- modules/30-variables/23-constants/test.js | 2 +- modules/31-advanced-strings/25-interpolation/test.js | 2 +- modules/31-advanced-strings/30-symbols/test.js | 2 +- modules/31-advanced-strings/70-slices/test.js | 2 +- modules/31-advanced-strings/90-multiline-strings/test.js | 2 +- modules/33-data-types/10-primitive-data-types/test.js | 2 +- modules/33-data-types/50-data-types-weak-typing/test.js | 2 +- modules/33-data-types/52-data-types-immutability/test.js | 2 +- modules/33-data-types/55-data-types-casting/test.js | 2 +- modules/35-calling-functions/100-call/test.js | 2 +- .../135-calling-functions-default-params/test.js | 2 +- .../150-calling-functions-expression/test.js | 2 +- modules/35-calling-functions/180-variadic-parameters/test.js | 2 +- modules/35-calling-functions/270-deterministic/test.js | 2 +- modules/38-objects/100-objects/test.js | 2 +- modules/38-objects/200-methods-immutability/test.js | 2 +- modules/38-objects/500-method-chain/test.js | 2 +- modules/40-define-functions/100-define-function/test.js | 2 +- modules/40-define-functions/150-return/test.js | 2 +- modules/40-define-functions/340-default-parameters/test.js | 2 +- modules/40-define-functions/350-type-annotations/test.js | 2 +- .../450-define-functions-short-syntax/test.js | 2 +- modules/40-define-functions/460-modules/test.js | 2 +- modules/40-define-functions/470-packages/test.js | 2 +- modules/45-logic/10-bool-type/test.js | 2 +- modules/45-logic/17-bool-strings/test.js | 2 +- modules/45-logic/20-logic-combine-expressions/test.js | 2 +- modules/45-logic/25-logical-operators/test.js | 2 +- modules/45-logic/28-logical-negation/test.js | 2 +- modules/45-logic/70-logical-expressions/test.js | 2 +- modules/48-conditionals/30-if/test.js | 2 +- modules/48-conditionals/40-if-else/test.js | 2 +- modules/48-conditionals/50-else-if/test.js | 2 +- modules/48-conditionals/60-ternary-operator/test.js | 2 +- modules/48-conditionals/65-switch/test.js | 2 +- modules/50-loops/10-while/test.js | 2 +- modules/50-loops/15-conditions-inside-loops/test.js | 2 +- modules/50-loops/20-aggregation-numbers/test.js | 2 +- modules/50-loops/23-aggregation-strings/test.js | 2 +- modules/50-loops/25-iteration-over-string/test.js | 2 +- modules/50-loops/30-syntactic-sugar/test.js | 2 +- modules/50-loops/50-mutators/test.js | 2 +- modules/50-loops/55-return-from-loops/test.js | 2 +- modules/50-loops/70-for/test.js | 2 +- modules/50-loops/90-debug/test.js | 2 +- 68 files changed, 68 insertions(+), 68 deletions(-) diff --git a/modules/10-basics/40-instructions/test.js b/modules/10-basics/40-instructions/test.js index 83e3b408..58c122cf 100644 --- a/modules/10-basics/40-instructions/test.js +++ b/modules/10-basics/40-instructions/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('instructions', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/10-basics/45-testing/test.js b/modules/10-basics/45-testing/test.js index 124ac3e7..643d5e0c 100644 --- a/modules/10-basics/45-testing/test.js +++ b/modules/10-basics/45-testing/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('testing', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/10-basics/50-syntax-errors/test.js b/modules/10-basics/50-syntax-errors/test.js index a41c22fb..df57c200 100644 --- a/modules/10-basics/50-syntax-errors/test.js +++ b/modules/10-basics/50-syntax-errors/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('syntax errors', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/20-basic/test.js b/modules/20-arithmetics/20-basic/test.js index b5bdee5a..b82ba185 100644 --- a/modules/20-arithmetics/20-basic/test.js +++ b/modules/20-arithmetics/20-basic/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('basic', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/25-operator/test.js b/modules/20-arithmetics/25-operator/test.js index afd97ffe..5b95d30e 100644 --- a/modules/20-arithmetics/25-operator/test.js +++ b/modules/20-arithmetics/25-operator/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('operator', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/27-commutativity/test.js b/modules/20-arithmetics/27-commutativity/test.js index 492330e2..9fadc132 100644 --- a/modules/20-arithmetics/27-commutativity/test.js +++ b/modules/20-arithmetics/27-commutativity/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('commutativity', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/30-composition/test.js b/modules/20-arithmetics/30-composition/test.js index 74d0ff25..c483eb6a 100644 --- a/modules/20-arithmetics/30-composition/test.js +++ b/modules/20-arithmetics/30-composition/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('composition', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/40-priority/test.js b/modules/20-arithmetics/40-priority/test.js index fc32d991..7605942c 100644 --- a/modules/20-arithmetics/40-priority/test.js +++ b/modules/20-arithmetics/40-priority/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('priority', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/50-float/test.js b/modules/20-arithmetics/50-float/test.js index ddda4ff0..b12bc4f6 100644 --- a/modules/20-arithmetics/50-float/test.js +++ b/modules/20-arithmetics/50-float/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('float', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/60-infinity/test.js b/modules/20-arithmetics/60-infinity/test.js index fb529602..f28f6266 100644 --- a/modules/20-arithmetics/60-infinity/test.js +++ b/modules/20-arithmetics/60-infinity/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('infinity', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/70-nan/test.js b/modules/20-arithmetics/70-nan/test.js index ea36893c..b3d9ef22 100644 --- a/modules/20-arithmetics/70-nan/test.js +++ b/modules/20-arithmetics/70-nan/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('nan', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/20-arithmetics/80-linting/test.js b/modules/20-arithmetics/80-linting/test.js index c7c96446..f98a8d51 100644 --- a/modules/20-arithmetics/80-linting/test.js +++ b/modules/20-arithmetics/80-linting/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('linting', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/25-strings/10-quotes/test.js b/modules/25-strings/10-quotes/test.js index 0cd15688..b9d5bc11 100644 --- a/modules/25-strings/10-quotes/test.js +++ b/modules/25-strings/10-quotes/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('quotes', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/25-strings/15-escape-characters/test.js b/modules/25-strings/15-escape-characters/test.js index 748debf6..7956efbd 100644 --- a/modules/25-strings/15-escape-characters/test.js +++ b/modules/25-strings/15-escape-characters/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('escape characters', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/25-strings/20-string-concatenation/test.js b/modules/25-strings/20-string-concatenation/test.js index fda4d445..92233796 100644 --- a/modules/25-strings/20-string-concatenation/test.js +++ b/modules/25-strings/20-string-concatenation/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('string concatenation', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/25-strings/30-encoding/test.js b/modules/25-strings/30-encoding/test.js index b82695ea..90aaa457 100644 --- a/modules/25-strings/30-encoding/test.js +++ b/modules/25-strings/30-encoding/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('encoding', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/10-definition/test.js b/modules/30-variables/10-definition/test.js index e71f0074..41837426 100644 --- a/modules/30-variables/10-definition/test.js +++ b/modules/30-variables/10-definition/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('definition', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/11-change/test.js b/modules/30-variables/11-change/test.js index 131314df..5a1ee3e6 100644 --- a/modules/30-variables/11-change/test.js +++ b/modules/30-variables/11-change/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('change', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/13-variables-naming/test.js b/modules/30-variables/13-variables-naming/test.js index 183398a4..977ea482 100644 --- a/modules/30-variables/13-variables-naming/test.js +++ b/modules/30-variables/13-variables-naming/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('variables naming', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/15-variables-expressions/test.js b/modules/30-variables/15-variables-expressions/test.js index eae8b280..4007f3ce 100644 --- a/modules/30-variables/15-variables-expressions/test.js +++ b/modules/30-variables/15-variables-expressions/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('variables expressions', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/18-variable-concatenation/test.js b/modules/30-variables/18-variable-concatenation/test.js index ca01aa15..4847336a 100644 --- a/modules/30-variables/18-variable-concatenation/test.js +++ b/modules/30-variables/18-variable-concatenation/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('variable concatenation', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/19-naming-style/test.js b/modules/30-variables/19-naming-style/test.js index 3e623485..1c9c4602 100644 --- a/modules/30-variables/19-naming-style/test.js +++ b/modules/30-variables/19-naming-style/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('naming style', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/20-magic-numbers/test.js b/modules/30-variables/20-magic-numbers/test.js index 4fa960e4..cf2a19b3 100644 --- a/modules/30-variables/20-magic-numbers/test.js +++ b/modules/30-variables/20-magic-numbers/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('magic numbers', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/30-variables/23-constants/test.js b/modules/30-variables/23-constants/test.js index acdbbe80..7f223872 100644 --- a/modules/30-variables/23-constants/test.js +++ b/modules/30-variables/23-constants/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('constants', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/31-advanced-strings/25-interpolation/test.js b/modules/31-advanced-strings/25-interpolation/test.js index 36679ba2..edb3001d 100644 --- a/modules/31-advanced-strings/25-interpolation/test.js +++ b/modules/31-advanced-strings/25-interpolation/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('interpolation', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/31-advanced-strings/30-symbols/test.js b/modules/31-advanced-strings/30-symbols/test.js index afb53327..3db33fa0 100644 --- a/modules/31-advanced-strings/30-symbols/test.js +++ b/modules/31-advanced-strings/30-symbols/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('symbols', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/31-advanced-strings/70-slices/test.js b/modules/31-advanced-strings/70-slices/test.js index 95234812..0c3ee853 100644 --- a/modules/31-advanced-strings/70-slices/test.js +++ b/modules/31-advanced-strings/70-slices/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('slices', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/31-advanced-strings/90-multiline-strings/test.js b/modules/31-advanced-strings/90-multiline-strings/test.js index 04c50006..7d2e10da 100644 --- a/modules/31-advanced-strings/90-multiline-strings/test.js +++ b/modules/31-advanced-strings/90-multiline-strings/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('multiline strings', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/33-data-types/10-primitive-data-types/test.js b/modules/33-data-types/10-primitive-data-types/test.js index 453b77a7..32bf9d5d 100644 --- a/modules/33-data-types/10-primitive-data-types/test.js +++ b/modules/33-data-types/10-primitive-data-types/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('primitive data types', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/33-data-types/50-data-types-weak-typing/test.js b/modules/33-data-types/50-data-types-weak-typing/test.js index 9520c8d4..14521494 100644 --- a/modules/33-data-types/50-data-types-weak-typing/test.js +++ b/modules/33-data-types/50-data-types-weak-typing/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('data types weak typing', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/33-data-types/52-data-types-immutability/test.js b/modules/33-data-types/52-data-types-immutability/test.js index 6e8f1260..cd6b0fee 100644 --- a/modules/33-data-types/52-data-types-immutability/test.js +++ b/modules/33-data-types/52-data-types-immutability/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('data types immutability', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/33-data-types/55-data-types-casting/test.js b/modules/33-data-types/55-data-types-casting/test.js index 3748162c..ffc49a99 100644 --- a/modules/33-data-types/55-data-types-casting/test.js +++ b/modules/33-data-types/55-data-types-casting/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('data types casting', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/35-calling-functions/100-call/test.js b/modules/35-calling-functions/100-call/test.js index 75476f86..c4b81a34 100644 --- a/modules/35-calling-functions/100-call/test.js +++ b/modules/35-calling-functions/100-call/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('call', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/35-calling-functions/135-calling-functions-default-params/test.js b/modules/35-calling-functions/135-calling-functions-default-params/test.js index 48a7af3c..e54f6abd 100644 --- a/modules/35-calling-functions/135-calling-functions-default-params/test.js +++ b/modules/35-calling-functions/135-calling-functions-default-params/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('calling functions default params', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/35-calling-functions/150-calling-functions-expression/test.js b/modules/35-calling-functions/150-calling-functions-expression/test.js index 3eab909e..573f1a69 100644 --- a/modules/35-calling-functions/150-calling-functions-expression/test.js +++ b/modules/35-calling-functions/150-calling-functions-expression/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('calling functions expression', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/35-calling-functions/180-variadic-parameters/test.js b/modules/35-calling-functions/180-variadic-parameters/test.js index aa132a91..02f5b00a 100644 --- a/modules/35-calling-functions/180-variadic-parameters/test.js +++ b/modules/35-calling-functions/180-variadic-parameters/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('variadic parameters', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/35-calling-functions/270-deterministic/test.js b/modules/35-calling-functions/270-deterministic/test.js index 8e52f740..6e4d1e1c 100644 --- a/modules/35-calling-functions/270-deterministic/test.js +++ b/modules/35-calling-functions/270-deterministic/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('deterministic', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/38-objects/100-objects/test.js b/modules/38-objects/100-objects/test.js index 9ba59616..3ac7a130 100644 --- a/modules/38-objects/100-objects/test.js +++ b/modules/38-objects/100-objects/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('objects', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/38-objects/200-methods-immutability/test.js b/modules/38-objects/200-methods-immutability/test.js index 6fea4306..f6681c12 100644 --- a/modules/38-objects/200-methods-immutability/test.js +++ b/modules/38-objects/200-methods-immutability/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('methods immutability', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/38-objects/500-method-chain/test.js b/modules/38-objects/500-method-chain/test.js index 0b700f8b..8e242a56 100644 --- a/modules/38-objects/500-method-chain/test.js +++ b/modules/38-objects/500-method-chain/test.js @@ -2,7 +2,7 @@ import { expect, test, vi } from 'vitest'; -test('hello world', async () => { +test('method chain', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); await import('./index.js'); diff --git a/modules/40-define-functions/100-define-function/test.js b/modules/40-define-functions/100-define-function/test.js index 074fdc2a..658328b4 100644 --- a/modules/40-define-functions/100-define-function/test.js +++ b/modules/40-define-functions/100-define-function/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; import f from './index.js'; -test('hello world', async () => { +test('define function', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); f(); diff --git a/modules/40-define-functions/150-return/test.js b/modules/40-define-functions/150-return/test.js index b0d1c54b..d218de22 100644 --- a/modules/40-define-functions/150-return/test.js +++ b/modules/40-define-functions/150-return/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('return', () => { expect(f('text', 3)).toBe('tex...'); expect(f('hexlet learning', 6)).toBe('hexlet...'); }); diff --git a/modules/40-define-functions/340-default-parameters/test.js b/modules/40-define-functions/340-default-parameters/test.js index 2bd1df4c..d8d193de 100644 --- a/modules/40-define-functions/340-default-parameters/test.js +++ b/modules/40-define-functions/340-default-parameters/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('default parameters', () => { expect(f('1234123412341234')).toEqual('****1234'); expect(f('1234123412344321')).toEqual('****4321'); expect(f('1234123412344321', 2)).toEqual('**4321'); diff --git a/modules/40-define-functions/350-type-annotations/test.js b/modules/40-define-functions/350-type-annotations/test.js index 40a2e69d..868f7682 100644 --- a/modules/40-define-functions/350-type-annotations/test.js +++ b/modules/40-define-functions/350-type-annotations/test.js @@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs'; import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('type annotations', () => { const source = readFileSync(new URL('./index.js', import.meta.url), 'utf8'); const paramAnnotations = source.match(/@param\s*\{/g) ?? []; expect( diff --git a/modules/40-define-functions/450-define-functions-short-syntax/test.js b/modules/40-define-functions/450-define-functions-short-syntax/test.js index cd93f80e..83d73fe6 100644 --- a/modules/40-define-functions/450-define-functions-short-syntax/test.js +++ b/modules/40-define-functions/450-define-functions-short-syntax/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('define functions short syntax', () => { const expected1 = 'Daenerys'; const actual1 = f('daenerys'); expect(f(actual1)).toEqual(expected1); diff --git a/modules/40-define-functions/460-modules/test.js b/modules/40-define-functions/460-modules/test.js index 7d7b87dd..68726c60 100644 --- a/modules/40-define-functions/460-modules/test.js +++ b/modules/40-define-functions/460-modules/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import mirror from './index.js'; -test('mirror', () => { +test('modules', () => { expect(mirror('hello')).toBe('OLLEH'); expect(mirror('Hexlet')).toBe('TELXEH'); }); diff --git a/modules/40-define-functions/470-packages/test.js b/modules/40-define-functions/470-packages/test.js index 417627c5..7c3c7201 100644 --- a/modules/40-define-functions/470-packages/test.js +++ b/modules/40-define-functions/470-packages/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import formatPrice from './index.js'; -test('formatPrice', () => { +test('packages', () => { expect(formatPrice(12.3456)).toBe('12.35'); expect(formatPrice(2.5)).toBe('2.50'); expect(formatPrice(10)).toBe('10.00'); diff --git a/modules/45-logic/10-bool-type/test.js b/modules/45-logic/10-bool-type/test.js index 59b7f622..4a249517 100644 --- a/modules/45-logic/10-bool-type/test.js +++ b/modules/45-logic/10-bool-type/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('bool type', () => { expect(f(23)).toBe(false); expect(f(70)).toBe(true); expect(f(60)).toBe(true); diff --git a/modules/45-logic/17-bool-strings/test.js b/modules/45-logic/17-bool-strings/test.js index 648a30a0..4eed06ca 100644 --- a/modules/45-logic/17-bool-strings/test.js +++ b/modules/45-logic/17-bool-strings/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('bool strings', () => { expect(f('apple')).toBe(false); expect(f('banana')).toBe(true); expect(f('pineapple')).toBe(true); diff --git a/modules/45-logic/20-logic-combine-expressions/test.js b/modules/45-logic/20-logic-combine-expressions/test.js index 95c637e1..30f883ea 100644 --- a/modules/45-logic/20-logic-combine-expressions/test.js +++ b/modules/45-logic/20-logic-combine-expressions/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('logic combine expressions', () => { expect(f('89602223423')).toBe(false); expect(f('+79602223423')).toBe(true); }); diff --git a/modules/45-logic/25-logical-operators/test.js b/modules/45-logic/25-logical-operators/test.js index 28dfffba..86363d8b 100644 --- a/modules/45-logic/25-logical-operators/test.js +++ b/modules/45-logic/25-logical-operators/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('logical operators', () => { expect(f(2016)).toBe(true); expect(f(2000)).toBe(true); expect(f(2017)).toBe(false); diff --git a/modules/45-logic/28-logical-negation/test.js b/modules/45-logic/28-logical-negation/test.js index 1e8047ba..a4aadf03 100644 --- a/modules/45-logic/28-logical-negation/test.js +++ b/modules/45-logic/28-logical-negation/test.js @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('logical negation', () => { expect(f('wow')).toBe(false); expect(f('hexlet')).toBe(true); expect(f('asdffdsa')).toBe(false); diff --git a/modules/45-logic/70-logical-expressions/test.js b/modules/45-logic/70-logical-expressions/test.js index ee6e81e3..00be5ec0 100644 --- a/modules/45-logic/70-logical-expressions/test.js +++ b/modules/45-logic/70-logical-expressions/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('logical expressions', () => { const name = 'Hexlet'; expect(f(name, 0)).toBe(''); expect(f(name, 1)).toBe('H'); diff --git a/modules/48-conditionals/30-if/test.js b/modules/48-conditionals/30-if/test.js index 64971bef..59a3452b 100644 --- a/modules/48-conditionals/30-if/test.js +++ b/modules/48-conditionals/30-if/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('if', () => { expect(f(100500)).toBe('Try again!'); expect(f(42)).toBe('You win!'); }); diff --git a/modules/48-conditionals/40-if-else/test.js b/modules/48-conditionals/40-if-else/test.js index b201ac70..0b3b1c6a 100644 --- a/modules/48-conditionals/40-if-else/test.js +++ b/modules/48-conditionals/40-if-else/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('if else', () => { expect(f('yandex.ru')).toBe('https://yandex.ru'); expect(f('https://yandex.ru')).toBe('https://yandex.ru'); }); diff --git a/modules/48-conditionals/50-else-if/test.js b/modules/48-conditionals/50-else-if/test.js index 3f684be6..b02085d1 100644 --- a/modules/48-conditionals/50-else-if/test.js +++ b/modules/48-conditionals/50-else-if/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('else if', () => { expect(f('green')).toBe('go'); expect(f('yellow')).toBe('slow down'); expect(f('red')).toBe('stop'); diff --git a/modules/48-conditionals/60-ternary-operator/test.js b/modules/48-conditionals/60-ternary-operator/test.js index 49d83e71..9205e10c 100644 --- a/modules/48-conditionals/60-ternary-operator/test.js +++ b/modules/48-conditionals/60-ternary-operator/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('ternary operator', () => { expect(f('flip')).toBe('flop'); expect(f('flop')).toBe('flip'); expect(f('hello')).toBe('flip'); diff --git a/modules/48-conditionals/65-switch/test.js b/modules/48-conditionals/65-switch/test.js index e9f8b18c..fac8f431 100644 --- a/modules/48-conditionals/65-switch/test.js +++ b/modules/48-conditionals/65-switch/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('switch', () => { expect(f(0)).toBe('just a number'); expect(f(666)).toBe('devil number'); expect(f(42)).toBe('answer for everything'); diff --git a/modules/50-loops/10-while/test.js b/modules/50-loops/10-while/test.js index fdfb5b82..dddd81fe 100644 --- a/modules/50-loops/10-while/test.js +++ b/modules/50-loops/10-while/test.js @@ -3,7 +3,7 @@ import { expect, test, vi } from 'vitest'; import f from './index.js'; -test('printNumbers', async () => { +test('while', async () => { const consoleLogSpy = vi.spyOn(console, 'log'); f(6); diff --git a/modules/50-loops/15-conditions-inside-loops/test.js b/modules/50-loops/15-conditions-inside-loops/test.js index 2b45c92e..fbea5560 100644 --- a/modules/50-loops/15-conditions-inside-loops/test.js +++ b/modules/50-loops/15-conditions-inside-loops/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('conditions inside loops', () => { expect(f('axe', 'a')).toEqual(1); expect(f('', 'a')).toEqual(0); expect(f('OpPa', 'p')).toEqual(2); diff --git a/modules/50-loops/20-aggregation-numbers/test.js b/modules/50-loops/20-aggregation-numbers/test.js index e7034245..646780b1 100644 --- a/modules/50-loops/20-aggregation-numbers/test.js +++ b/modules/50-loops/20-aggregation-numbers/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('aggregation numbers', () => { expect(f(0)).toBe(0); expect(f(80)).toBe(400); expect(f(100)).toBe(500); diff --git a/modules/50-loops/23-aggregation-strings/test.js b/modules/50-loops/23-aggregation-strings/test.js index 31b58908..74105b2c 100644 --- a/modules/50-loops/23-aggregation-strings/test.js +++ b/modules/50-loops/23-aggregation-strings/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('aggregation strings', () => { expect(f('+7 (999) 123-45-67')).toBe('+79991234567'); expect(f('8 800 555 35 35')).toBe('88005553535'); expect(f('(123) 456-7890')).toBe('1234567890'); diff --git a/modules/50-loops/25-iteration-over-string/test.js b/modules/50-loops/25-iteration-over-string/test.js index c99d61a1..5bf7d74f 100644 --- a/modules/50-loops/25-iteration-over-string/test.js +++ b/modules/50-loops/25-iteration-over-string/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('iteration over string', () => { expect(f('1234567812345678')).toBe('************5678'); expect(f('12345678')).toBe('****5678'); }); diff --git a/modules/50-loops/30-syntactic-sugar/test.js b/modules/50-loops/30-syntactic-sugar/test.js index 34f3704e..a6b05b20 100644 --- a/modules/50-loops/30-syntactic-sugar/test.js +++ b/modules/50-loops/30-syntactic-sugar/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('syntactic sugar', () => { const text = 'If I look back I am lost'; expect(f(text, 'I')).toEqual('f look back am lost'); expect(f('zz Zorro', 'z')).toEqual(' Zorro'); diff --git a/modules/50-loops/50-mutators/test.js b/modules/50-loops/50-mutators/test.js index 7843897f..0569484b 100644 --- a/modules/50-loops/50-mutators/test.js +++ b/modules/50-loops/50-mutators/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('mutators', () => { const text = 'I never look back'; expect(f(text, 3)).toEqual('I NevEr LooK bAck'); expect(f('hello', 2)).toEqual('hElLo'); diff --git a/modules/50-loops/55-return-from-loops/test.js b/modules/50-loops/55-return-from-loops/test.js index 1fd544ba..f1176adf 100644 --- a/modules/50-loops/55-return-from-loops/test.js +++ b/modules/50-loops/55-return-from-loops/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('return from loops', () => { expect(f('support@example.com')).toBe(true); expect(f('wrong-email')).toBe(false); expect(f('@admin')).toBe(true); diff --git a/modules/50-loops/70-for/test.js b/modules/50-loops/70-for/test.js index 77a976c6..5087d211 100644 --- a/modules/50-loops/70-for/test.js +++ b/modules/50-loops/70-for/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('for', () => { expect(f(3)).toEqual('1 2 Fizz'); expect(f(5)).toEqual('1 2 Fizz 4 Buzz'); expect(f(15)).toEqual( diff --git a/modules/50-loops/90-debug/test.js b/modules/50-loops/90-debug/test.js index 7708354a..efc3237b 100644 --- a/modules/50-loops/90-debug/test.js +++ b/modules/50-loops/90-debug/test.js @@ -1,7 +1,7 @@ import { expect, test } from 'vitest'; import f from './index.js'; -test('test', () => { +test('debug', () => { expect(f('aaabcccc')).toBe('a3bc4'); expect(f('abcd')).toBe('abcd'); expect(f('aabbaa')).toBe('a2b2a2');