From 26fef6f294194b2cc7d52d565d03c1549cddfb78 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 16 Jul 2021 13:45:10 +0100 Subject: [PATCH] actually run the new test and remove unrelated tweak --- package.json | 2 +- src/@types/global.d.ts | 5 ----- test/unit-tests/url_utils-test.ts | 10 +++++++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 82d78d3310..9016336c01 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "jest": { "testEnvironment": "jest-environment-jsdom-sixteen", "testMatch": [ - "/test/**/*-test.js" + "/test/**/*-test.[tj]s" ], "setupFilesAfterEnv": [ "/node_modules/matrix-react-sdk/test/setupTests.js" diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 805639310e..521150648a 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -35,11 +35,6 @@ type ElectronChannel = declare global { interface Window { - Modernizr: ModernizrAPI & FeatureDetects; - Olm: { - init: () => Promise; - }; - mxSendRageshake: (text: string, withLogs?: boolean) => void; matrixChat: ReturnType; diff --git a/test/unit-tests/url_utils-test.ts b/test/unit-tests/url_utils-test.ts index 1d5a4d29f7..784dde2d1c 100644 --- a/test/unit-tests/url_utils-test.ts +++ b/test/unit-tests/url_utils-test.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import {parseQsFromFragment, parseQs} from "../../src/vector/url_utils"; +import { parseQsFromFragment, parseQs } from "../../src/vector/url_utils"; describe("url_utils.ts", function() { // @ts-ignore @@ -39,4 +39,12 @@ describe("url_utils.ts", function() { "foo": "bar", }); }); + + describe("parseQs with arrays", function() { + location.search = "?via=s1&via=s2&via=s2&foo=bar"; + expect(parseQs(location)).toEqual({ + "via": ["s1", "s2", "s2"], + "foo": "bar", + }); + }); });