From 5f60a7fd5ff43e25d148d9be1ec999f13eac5a83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 26 Oct 2022 00:09:08 +0200 Subject: [PATCH] Add vscode configuration for unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .vscode/extensions.json | 1 + .vscode/settings.json | 4 +++- test/utils/UtilsTest.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index bed2ea6e..7caf68c6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,6 +6,7 @@ "dbaeumer.vscode-eslint", "eamodio.gitlens", "EditorConfig.EditorConfig", + "hbenl.vscode-mocha-test-adapter", "ms-azuretools.vscode-docker", "streetsidesoftware.code-spell-checker" ] diff --git a/.vscode/settings.json b/.vscode/settings.json index eb3d18bb..f522dcb8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,7 @@ { "editor.codeActionsOnSave": { "source.fixAll": true - } + }, + "testExplorer.useNativeTesting": true, + "mochaExplorer.files": ["test/**/*Test.ts"] } diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index bc260cee..97289ff9 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -42,6 +42,8 @@ describe('Utils test suite', () => { expect(Utils.isIterable([])).toBe(true); expect(Utils.isIterable(new Map())).toBe(true); expect(Utils.isIterable(new Set())).toBe(true); + expect(Utils.isIterable(new WeakMap())).toBe(false); + expect(Utils.isIterable(new WeakSet())).toBe(false); }); it('Verify isEmptyString()', () => { -- 2.34.1