Remove lolex where its not needed and move to dev-deps. Remove unused optimist
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8ba54f5f7d
commit
9365a9cb30
4 changed files with 24 additions and 16 deletions
|
@ -80,9 +80,7 @@
|
||||||
"isomorphic-fetch": "^2.2.1",
|
"isomorphic-fetch": "^2.2.1",
|
||||||
"linkifyjs": "^2.1.6",
|
"linkifyjs": "^2.1.6",
|
||||||
"lodash": "^4.17.14",
|
"lodash": "^4.17.14",
|
||||||
"lolex": "4.2",
|
|
||||||
"matrix-js-sdk": "3.0.0",
|
"matrix-js-sdk": "3.0.0",
|
||||||
"optimist": "^0.6.1",
|
|
||||||
"pako": "^1.0.5",
|
"pako": "^1.0.5",
|
||||||
"png-chunks-extract": "^1.0.0",
|
"png-chunks-extract": "^1.0.0",
|
||||||
"prop-types": "^15.5.8",
|
"prop-types": "^15.5.8",
|
||||||
|
@ -138,6 +136,7 @@
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"flow-parser": "^0.57.3",
|
"flow-parser": "^0.57.3",
|
||||||
"jest": "^24.9.0",
|
"jest": "^24.9.0",
|
||||||
|
"lolex": "^5.1.2",
|
||||||
"matrix-mock-request": "^1.2.3",
|
"matrix-mock-request": "^1.2.3",
|
||||||
"matrix-react-test-utils": "^0.2.2",
|
"matrix-react-test-utils": "^0.2.2",
|
||||||
"react-test-renderer": "^16.9.0",
|
"react-test-renderer": "^16.9.0",
|
||||||
|
@ -157,7 +156,9 @@
|
||||||
"testMatch": [
|
"testMatch": [
|
||||||
"<rootDir>/test/**/*-test.js"
|
"<rootDir>/test/**/*-test.js"
|
||||||
],
|
],
|
||||||
"setupTestFrameworkScriptFile": "<rootDir>/test/setupTests.js",
|
"setupFilesAfterEnv": [
|
||||||
|
"<rootDir>/test/setupTests.js"
|
||||||
|
],
|
||||||
"moduleNameMapper": {
|
"moduleNameMapper": {
|
||||||
"\\.(gif|png|svg|ttf|woff2)$": "<rootDir>/__mocks__/imageMock.js",
|
"\\.(gif|png|svg|ttf|woff2)$": "<rootDir>/__mocks__/imageMock.js",
|
||||||
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json"
|
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json"
|
||||||
|
|
|
@ -15,7 +15,6 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import lolex from 'lolex';
|
import lolex from 'lolex';
|
||||||
import jest from 'jest-mock';
|
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
import UserActivity from '../src/UserActivity';
|
import UserActivity from '../src/UserActivity';
|
||||||
|
|
||||||
|
@ -36,8 +35,8 @@ describe('UserActivity', function() {
|
||||||
let clock;
|
let clock;
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
fakeWindow = new FakeDomEventEmitter(),
|
fakeWindow = new FakeDomEventEmitter();
|
||||||
fakeDocument = new FakeDomEventEmitter(),
|
fakeDocument = new FakeDomEventEmitter();
|
||||||
userActivity = new UserActivity(fakeWindow, fakeDocument);
|
userActivity = new UserActivity(fakeWindow, fakeDocument);
|
||||||
userActivity.start();
|
userActivity.start();
|
||||||
clock = lolex.install();
|
clock = lolex.install();
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTestUtils from 'react-dom/test-utils';
|
import ReactTestUtils from 'react-dom/test-utils';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import lolex from 'lolex';
|
|
||||||
|
|
||||||
import * as TestUtils from '../../../test-utils';
|
import * as TestUtils from '../../../test-utils';
|
||||||
|
|
||||||
|
@ -27,7 +26,6 @@ describe('MemberList', () => {
|
||||||
let parentDiv = null;
|
let parentDiv = null;
|
||||||
let client = null;
|
let client = null;
|
||||||
let root = null;
|
let root = null;
|
||||||
let clock = null;
|
|
||||||
let memberListRoom;
|
let memberListRoom;
|
||||||
let memberList = null;
|
let memberList = null;
|
||||||
|
|
||||||
|
@ -40,8 +38,6 @@ describe('MemberList', () => {
|
||||||
client = MatrixClientPeg.get();
|
client = MatrixClientPeg.get();
|
||||||
client.hasLazyLoadMembersEnabled = () => false;
|
client.hasLazyLoadMembersEnabled = () => false;
|
||||||
|
|
||||||
clock = lolex.install();
|
|
||||||
|
|
||||||
parentDiv = document.createElement('div');
|
parentDiv = document.createElement('div');
|
||||||
document.body.appendChild(parentDiv);
|
document.body.appendChild(parentDiv);
|
||||||
|
|
||||||
|
@ -114,8 +110,6 @@ describe('MemberList', () => {
|
||||||
parentDiv = null;
|
parentDiv = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
clock.uninstall();
|
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
22
yarn.lock
22
yarn.lock
|
@ -1137,6 +1137,13 @@
|
||||||
tslib "^1.10.0"
|
tslib "^1.10.0"
|
||||||
webcrypto-core "^1.0.17"
|
webcrypto-core "^1.0.17"
|
||||||
|
|
||||||
|
"@sinonjs/commons@^1.7.0":
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.0.tgz#f90ffc52a2e519f018b13b6c4da03cbff36ebed6"
|
||||||
|
integrity sha512-qbk9AP+cZUsKdW1GJsBpxPKFmCJ0T8swwzVje3qFd+AkQb74Q/tiuzrdfFg8AD2g5HH/XbE/I8Uc1KYHVYWfhg==
|
||||||
|
dependencies:
|
||||||
|
type-detect "4.0.8"
|
||||||
|
|
||||||
"@types/babel__core@^7.1.0":
|
"@types/babel__core@^7.1.0":
|
||||||
version "7.1.3"
|
version "7.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30"
|
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30"
|
||||||
|
@ -5610,10 +5617,12 @@ loglevel@^1.6.4:
|
||||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312"
|
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312"
|
||||||
integrity sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ==
|
integrity sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ==
|
||||||
|
|
||||||
lolex@4.2:
|
lolex@^5.1.2:
|
||||||
version "4.2.0"
|
version "5.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/lolex/-/lolex-4.2.0.tgz#ddbd7f6213ca1ea5826901ab1222b65d714b3cd7"
|
resolved "https://registry.yarnpkg.com/lolex/-/lolex-5.1.2.tgz#953694d098ce7c07bc5ed6d0e42bc6c0c6d5a367"
|
||||||
integrity sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==
|
integrity sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==
|
||||||
|
dependencies:
|
||||||
|
"@sinonjs/commons" "^1.7.0"
|
||||||
|
|
||||||
longest-streak@^2.0.1:
|
longest-streak@^2.0.1:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
|
@ -8580,6 +8589,11 @@ type-check@~0.3.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
prelude-ls "~1.1.2"
|
prelude-ls "~1.1.2"
|
||||||
|
|
||||||
|
type-detect@4.0.8:
|
||||||
|
version "4.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
|
||||||
|
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
|
||||||
|
|
||||||
typedarray@^0.0.6:
|
typedarray@^0.0.6:
|
||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
|
|
Loading…
Reference in a new issue