Skip to content

Commit

Permalink
Merge branch 'develop' into travis/fix-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Jan 16, 2020
2 parents 909fddb + 2652060 commit 4e37f8a
Show file tree
Hide file tree
Showing 11 changed files with 1,502 additions and 860 deletions.
13 changes: 2 additions & 11 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,21 @@ steps:
- docker#v3.0.1:
image: "node:12"

- label: ":karma: Tests"
- label: ":jest: Tests"
agents:
# We use a medium sized instance instead of the normal small ones because
# webpack loves to gorge itself on resources.
queue: "medium"
command:
# Install chrome
- "echo '--- Installing Chrome'"
- "wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -"
- "sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list'"
- "apt-get update"
- "apt-get install -y google-chrome-stable"
# Run tests
- "echo '--- Fetching Dependencies'"
- "./scripts/fetch-develop.deps.sh --depth 1"
- "yarn install"
- "yarn build:genfiles" # We have to build the app to make sure the autogenned files are present
- "echo '+++ Running Tests'"
- "yarn test"
env:
CHROME_BIN: "/usr/bin/google-chrome-stable"
plugins:
- docker#v3.0.1:
image: "node:10"
propagate-environment: true

- label: ":hammer: Package"
command:
Expand Down
4 changes: 2 additions & 2 deletions .babelrc → babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
"sourceMaps": true,
"presets": [
["@babel/preset-env", {
Expand All @@ -22,4 +22,4 @@
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime"
]
}
};
171 changes: 0 additions & 171 deletions karma.conf.js

This file was deleted.

40 changes: 26 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"scripts",
"docs",
"release.sh",
"karma.conf.js",
"deploy",
"CHANGELOG.md",
"CONTRIBUTING.rst",
Expand Down Expand Up @@ -57,8 +56,7 @@
"lint:ts": "echo 'We don't actually have a typescript linter at this layer because tslint is being removed from our stack. Presumably your TS is fine.'",
"lint:types": "tsc --noEmit",
"lint:style": "stylelint 'res/css/**/*.scss'",
"test": "yarn build:genfiles && karma start --single-run=true --autoWatch=false --browsers VectorChromeHeadless",
"test:multi": "yarn build:genfiles && karma start"
"test": "jest"
},
"dependencies": {
"browser-request": "^0.3.3",
Expand Down Expand Up @@ -99,7 +97,9 @@
"@types/react-dom": "^16.9.4",
"autoprefixer": "^9.7.3",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"canvas": "^2.6.1",
"chokidar": "^2.0.4",
"concurrently": "^4.0.1",
"cpx": "^1.3.2",
Expand All @@ -116,28 +116,20 @@
"eslint-plugin-jest": "^23.0.4",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^2.2.0",
"expect": "^1.16.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"fake-indexeddb": "^3.0.0",
"file-loader": "^5.0.2",
"fs-extra": "^0.30.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.9.0",
"jest-environment-jsdom-fourteen": "^1.0.1",
"json-loader": "^0.5.3",
"karma": "^3.1.2",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-logcapture-reporter": "0.0.1",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-summary-reporter": "^1.5.1",
"karma-webpack": "4.0.0-beta.0",
"loader-utils": "^1.2.3",
"matrix-mock-request": "^1.2.3",
"matrix-react-test-utils": "^0.2.2",
"mini-css-extract-plugin": "^0.8.0",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mocha": "^5.2.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-extend": "^1.0.5",
"postcss-import": "^12.0.1",
Expand Down Expand Up @@ -198,5 +190,25 @@
"app": "electron_app"
},
"afterSign": "scripts/electron_afterSign.js"
},
"jest": {
"testEnvironment": "jest-environment-jsdom-fourteen",
"testMatch": [
"<rootDir>/test/**/*-test.js"
],
"setupFilesAfterEnv": [
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
],
"moduleNameMapper": {
"\\.(gif|png|svg|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
"\\$webapp/i18n/languages.json": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/languages.json",
"^browser-request$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/browser-request.js",
"^react$": "<rootDir>/node_modules/react",
"^react-dom$": "<rootDir>/node_modules/react-dom"
},
"transformIgnorePatterns": [
"/node_modules/(?!matrix-js-sdk).+$",
"/node_modules/(?!matrix-react-sdk).+$"
]
}
}
13 changes: 0 additions & 13 deletions test/all-tests.js

This file was deleted.

3 changes: 2 additions & 1 deletion test/app-tests/joining.js → test/app-tests/joining-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ import WebPlatform from '../../src/vector/platform/WebPlatform';
import * as sdk from "matrix-react-sdk";
import * as jssdk from "matrix-js-sdk";
import "../skin-sdk";
import "../jest-mocks";
import React from "react";
import ReactDOM from "react-dom";
import ReactTestUtils from "react-dom/test-utils";
import expect from "expect";
import {makeType} from "matrix-react-sdk/src/utils/TypeUtils";
import {ValidatedServerConfig} from "matrix-react-sdk/src/utils/AutoDiscoveryUtils";
import {sleep} from "../test-utils";
import * as test_utils from "../test-utils";
import MockHttpBackend from "matrix-mock-request";
import "fake-indexeddb/auto";


const MatrixChat = sdk.getComponent('structures.MatrixChat');
Expand Down
Loading

0 comments on commit 4e37f8a

Please sign in to comment.