From: Jérôme Benoit Date: Tue, 25 Oct 2022 22:09:08 +0000 (+0200) Subject: Add vscode configuration for unit tests X-Git-Tag: v1.1.86~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5f60a7fd5ff43e25d148d9be1ec999f13eac5a83;p=e-mobility-charging-stations-simulator.git Add vscode configuration for unit tests Signed-off-by: Jérôme Benoit --- 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()', () => {