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", + }); + }); });