Add vscode configuration for unit tests
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 25 Oct 2022 22:09:08 +0000 (00:09 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 25 Oct 2022 22:09:08 +0000 (00:09 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.vscode/extensions.json
.vscode/settings.json
test/utils/UtilsTest.ts

index bed2ea6ee33c9b6eed167c43a467d623b6894e2f..7caf68c600ba3dda8774e4b90507c2ff4c148e89 100644 (file)
@@ -6,6 +6,7 @@
     "dbaeumer.vscode-eslint",
     "eamodio.gitlens",
     "EditorConfig.EditorConfig",
+    "hbenl.vscode-mocha-test-adapter",
     "ms-azuretools.vscode-docker",
     "streetsidesoftware.code-spell-checker"
   ]
index eb3d18bbe9452ab8bcde30086aaa3631b92513c5..f522dcb8748b84bd46f0cc05843901c8281beb27 100644 (file)
@@ -1,5 +1,7 @@
 {
   "editor.codeActionsOnSave": {
     "source.fixAll": true
-  }
+  },
+  "testExplorer.useNativeTesting": true,
+  "mochaExplorer.files": ["test/**/*Test.ts"]
 }
index bc260cee4ba39965e488dad357617aa87200b9d5..97289ff94ab43fbc0186696f3e44e181c25023e5 100644 (file)
@@ -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()', () => {