actually run the new test and remove unrelated tweak

pull/13138/head
Michael Telatynski 2021-07-16 13:45:10 +01:00
parent 75e4d16462
commit 26fef6f294
3 changed files with 10 additions and 7 deletions

View File

@ -153,7 +153,7 @@
"jest": { "jest": {
"testEnvironment": "jest-environment-jsdom-sixteen", "testEnvironment": "jest-environment-jsdom-sixteen",
"testMatch": [ "testMatch": [
"<rootDir>/test/**/*-test.js" "<rootDir>/test/**/*-test.[tj]s"
], ],
"setupFilesAfterEnv": [ "setupFilesAfterEnv": [
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js" "<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"

View File

@ -35,11 +35,6 @@ type ElectronChannel =
declare global { declare global {
interface Window { interface Window {
Modernizr: ModernizrAPI & FeatureDetects;
Olm: {
init: () => Promise<void>;
};
mxSendRageshake: (text: string, withLogs?: boolean) => void; mxSendRageshake: (text: string, withLogs?: boolean) => void;
matrixChat: ReturnType<Renderer>; matrixChat: ReturnType<Renderer>;

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. 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() { describe("url_utils.ts", function() {
// @ts-ignore // @ts-ignore
@ -39,4 +39,12 @@ describe("url_utils.ts", function() {
"foo": "bar", "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",
});
});
}); });