Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump jest related packages #58095

Merged
merged 140 commits into from
Jun 20, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
9341c2f
Bump jest related packages
patrykkopycinski Feb 20, 2020
668e84e
dist
patrykkopycinski Feb 20, 2020
1bf49a6
update snapshots
patrykkopycinski Feb 20, 2020
78ed5c9
fix snapshot
patrykkopycinski Feb 20, 2020
8ed6ec3
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Feb 23, 2020
5e07b05
skip
patrykkopycinski Feb 23, 2020
abc5445
Merge branch 'master' into chore/bump-jest
elasticmachine Feb 23, 2020
3e78ea4
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Feb 25, 2020
dad4ffd
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Feb 26, 2020
bce0d82
snapshots
patrykkopycinski Feb 26, 2020
c9c973e
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Mar 5, 2020
da4dbde
Merge branch 'master' into chore/bump-jest
elasticmachine Mar 6, 2020
2ebca06
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Mar 20, 2020
23cdc19
update snapshots
patrykkopycinski Mar 20, 2020
7b69e53
rxjs
patrykkopycinski Mar 20, 2020
4123e44
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Mar 31, 2020
8a5d585
update tests
patrykkopycinski Mar 31, 2020
da61bf7
update kbn-pm/dist
patrykkopycinski Mar 31, 2020
5dfcfed
@types/acorn
patrykkopycinski Mar 31, 2020
f407709
Merge branch 'master' into chore/bump-jest
elasticmachine Mar 31, 2020
2c2c048
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Apr 1, 2020
5a888c9
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Apr 26, 2020
1aa4cb3
rxjs@6.5.5
patrykkopycinski Apr 26, 2020
34ae556
align jest versions
patrykkopycinski Apr 26, 2020
19b0fbb
fix tests
patrykkopycinski Apr 26, 2020
f51d2e4
cleanup
patrykkopycinski Apr 26, 2020
8f49d95
renovate
patrykkopycinski Apr 26, 2020
7242013
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 8, 2020
64f79fe
merge cleanup
patrykkopycinski May 8, 2020
d0dfe26
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 9, 2020
272b446
jest 25.5.4
patrykkopycinski May 9, 2020
b1a24fc
fix lint
patrykkopycinski May 9, 2020
4f8233f
remove unnecessary imports
patrykkopycinski May 9, 2020
f50a891
fix types
patrykkopycinski May 9, 2020
edd78ee
fix types
patrykkopycinski May 9, 2020
f7ee092
fix config
patrykkopycinski May 9, 2020
9ace15f
fix types
patrykkopycinski May 10, 2020
eac2675
cleanup
patrykkopycinski May 10, 2020
0ab4aec
cleanup
patrykkopycinski May 10, 2020
a465ef9
cleanup
patrykkopycinski May 10, 2020
e9a2eaf
revert testing-library
patrykkopycinski May 10, 2020
0b2e524
fix types
patrykkopycinski May 10, 2020
371046b
update serializers
patrykkopycinski May 10, 2020
70126dd
enable test
patrykkopycinski May 10, 2020
45a4d4f
build
patrykkopycinski May 10, 2020
89f56bc
fix types
patrykkopycinski May 10, 2020
fa83ef8
cleanup
patrykkopycinski May 11, 2020
d4c800a
Merge branch 'master' into chore/bump-jest
elasticmachine May 11, 2020
9c072ea
types
patrykkopycinski May 11, 2020
ed399f8
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 11, 2020
62ae348
update kbn-pm dist
patrykkopycinski May 11, 2020
a4c410f
typo
patrykkopycinski May 11, 2020
fec8509
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 12, 2020
ac51e8b
Merge branch 'master' into chore/bump-jest
elasticmachine May 12, 2020
8cfb9bc
fix merge
patrykkopycinski May 12, 2020
ffae1f9
fix snapshots
patrykkopycinski May 13, 2020
d7e4e64
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 13, 2020
507629a
Merge branch 'master' into chore/bump-jest
elasticmachine May 13, 2020
8944d17
Merge branch 'master' into chore/bump-jest
elasticmachine May 13, 2020
dd85834
update configs
patrykkopycinski May 13, 2020
82670c7
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 14, 2020
80f4522
Merge branch 'master' into chore/bump-jest
elasticmachine May 14, 2020
4ae4777
Merge branch 'master' into chore/bump-jest
elasticmachine May 14, 2020
f959c22
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 15, 2020
7709e2f
fix window.location.reload mock
patrykkopycinski May 15, 2020
233bfee
jest-circus
patrykkopycinski May 15, 2020
30d8611
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 16, 2020
09cdc91
remove circus
patrykkopycinski May 16, 2020
944094f
Merge branch 'master' into chore/bump-jest
elasticmachine May 17, 2020
d87ceda
Merge branch 'master' into chore/bump-jest
elasticmachine May 17, 2020
26a9991
Merge branch 'master' into chore/bump-jest
elasticmachine May 18, 2020
9a7494b
Fix timeouts
patrykkopycinski May 19, 2020
e52cdfd
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 21, 2020
c621646
Merge branch 'master' into chore/bump-jest
elasticmachine May 21, 2020
db5cca7
circus
patrykkopycinski May 22, 2020
34e87f3
migrate from jasmine
patrykkopycinski May 22, 2020
278f11f
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 22, 2020
30aa3cd
dist
patrykkopycinski May 22, 2020
87c30a4
lock
patrykkopycinski May 22, 2020
a8c3c94
dist
patrykkopycinski May 22, 2020
7ed7780
renovate
patrykkopycinski May 22, 2020
5b8a134
jsdom
patrykkopycinski May 22, 2020
607fc33
jsdom types
patrykkopycinski May 22, 2020
b9d478f
test
patrykkopycinski May 22, 2020
8b5afad
Merge branch 'master' into chore/bump-jest
elasticmachine May 23, 2020
b4f1971
test
patrykkopycinski May 23, 2020
cb76906
test
patrykkopycinski May 23, 2020
138c727
Merge branch 'master' into chore/bump-jest
elasticmachine May 24, 2020
7f289a0
circus
patrykkopycinski May 24, 2020
344de00
Merge branch 'chore/bump-jest' of github.com:patrykkopycinski/kibana …
patrykkopycinski May 24, 2020
12053cf
test
patrykkopycinski May 24, 2020
1724cdf
dist
patrykkopycinski May 24, 2020
1077d54
update snapshots
patrykkopycinski May 24, 2020
a5eb920
cleanupp
patrykkopycinski May 25, 2020
fa670d4
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 25, 2020
a0c5771
cleanup
patrykkopycinski May 25, 2020
ee7d528
snapshots
patrykkopycinski May 25, 2020
f843a56
snapshots
patrykkopycinski May 25, 2020
af0a5fe
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski May 25, 2020
3efb942
snapshots
patrykkopycinski May 25, 2020
320c8e5
Merge branch 'master' into chore/bump-jest
elasticmachine May 26, 2020
bb52935
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 6, 2020
78f1c8e
cleanup
patrykkopycinski Jun 6, 2020
222e62f
Fix type
patrykkopycinski Jun 7, 2020
787229f
timeout
patrykkopycinski Jun 7, 2020
5a90f37
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 8, 2020
3b48710
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 9, 2020
763d151
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 9, 2020
c4e2034
snapshots
patrykkopycinski Jun 9, 2020
329d82e
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 9, 2020
1122f34
update test
patrykkopycinski Jun 9, 2020
1690135
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 9, 2020
b972bb7
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 15, 2020
4851063
fix types
patrykkopycinski Jun 15, 2020
9e93266
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 15, 2020
d02d57a
cleanup
patrykkopycinski Jun 15, 2020
112f60f
Update index.test.tsx
patrykkopycinski Jun 15, 2020
0c6c923
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 15, 2020
8373f71
Merge branch 'master' of github.com:elastic/kibana; branch 'chore/bum…
patrykkopycinski Jun 16, 2020
f802ae5
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 16, 2020
3986f6c
Add types
patrykkopycinski Jun 16, 2020
9f15594
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 16, 2020
99a58d2
Update package.json
patrykkopycinski Jun 16, 2020
ec10124
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 16, 2020
903ee27
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 17, 2020
6c195d0
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 17, 2020
03a4e05
cleanup
patrykkopycinski Jun 17, 2020
adc5f8e
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 18, 2020
1206d0b
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 18, 2020
946231b
Merge branch 'master' into chore/bump-jest
patrykkopycinski Jun 19, 2020
a9a5a78
Fix types
patrykkopycinski Jun 19, 2020
36d6249
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 19, 2020
b15f952
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 19, 2020
babcb20
Update test
patrykkopycinski Jun 19, 2020
dee8d86
Merge branch 'chore/bump-jest' of github.com:patrykkopycinski/kibana …
patrykkopycinski Jun 19, 2020
af61359
Test
patrykkopycinski Jun 19, 2020
16e05c0
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 20, 2020
a07428a
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 20, 2020
d53ed2b
Merge branch 'master' of github.com:elastic/kibana into chore/bump-jest
patrykkopycinski Jun 20, 2020
f02d7e4
Merge branch 'master' into chore/bump-jest
elasticmachine Jun 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
"**/react-test-renderer": "^16.12.0",
"**/deepmerge": "^4.2.2",
"**/serialize-javascript": "^2.1.1",
"**/fast-deep-equal": "^3.1.1"
"**/fast-deep-equal": "^3.1.1",
"**/jsdom": "15.1.1"
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -331,7 +332,7 @@
"@types/has-ansi": "^3.0.0",
"@types/history": "^4.7.3",
"@types/hoek": "^4.1.3",
"@types/jest": "24.0.19",
"@types/jest": "^25.1.3",
"@types/joi": "^13.4.2",
"@types/jquery": "^3.3.31",
"@types/js-yaml": "^3.11.1",
Expand Down Expand Up @@ -374,6 +375,7 @@
"@types/styled-components": "^4.4.2",
"@types/supertest": "^2.0.5",
"@types/supertest-as-promised": "^2.0.38",
"@types/testing-library__jest-dom": "^5.0.1",
"@types/testing-library__react": "^9.1.2",
"@types/testing-library__react-hooks": "^3.1.0",
"@types/type-detect": "^4.0.1",
Expand All @@ -386,7 +388,7 @@
"archiver": "^3.1.1",
"axe-core": "^3.3.2",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-jest": "^25.1.0",
"babel-plugin-dynamic-import-node": "^2.3.0",
"babel-plugin-istanbul": "^5.2.0",
"backport": "4.9.0",
Expand All @@ -407,7 +409,7 @@
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-cypress": "^2.8.1",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.3.0",
"eslint-plugin-jest": "^23.8.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-no-unsanitized": "^3.0.2",
Expand Down Expand Up @@ -436,8 +438,8 @@
"intl-messageformat-parser": "^1.4.0",
"is-path-inside": "^2.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"jest": "^24.9.0",
"jest-cli": "^24.9.0",
"jest": "^25.1.0",
"jest-cli": "^25.1.0",
"jest-raw-loader": "^1.0.1",
"jimp": "0.8.4",
"json5": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint-plugin-ban": "^1.4.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jest": "^23.3.0",
"eslint-plugin-jest": "^23.7.0",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
Expand Down
31 changes: 12 additions & 19 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43046,28 +43046,21 @@ module.exports = require("tty");
const os = __webpack_require__(11);
const hasFlag = __webpack_require__(12);

const {env} = process;
const env = process.env;

let forceColor;
if (hasFlag('no-color') ||
hasFlag('no-colors') ||
hasFlag('color=false') ||
hasFlag('color=never')) {
forceColor = 0;
hasFlag('color=false')) {
forceColor = false;
} else if (hasFlag('color') ||
hasFlag('colors') ||
hasFlag('color=true') ||
hasFlag('color=always')) {
forceColor = 1;
forceColor = true;
}
if ('FORCE_COLOR' in env) {
if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') {
forceColor = 1;
} else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') {
forceColor = 0;
} else {
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
}
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
}

function translateLevel(level) {
Expand All @@ -43084,7 +43077,7 @@ function translateLevel(level) {
}

function supportsColor(stream) {
if (forceColor === 0) {
if (forceColor === false) {
return 0;
}

Expand All @@ -43098,15 +43091,11 @@ function supportsColor(stream) {
return 2;
}

if (stream && !stream.isTTY && forceColor === undefined) {
if (stream && !stream.isTTY && forceColor !== true) {
return 0;
}

const min = forceColor || 0;

if (env.TERM === 'dumb') {
return min;
}
const min = forceColor ? 1 : 0;

if (process.platform === 'win32') {
// Node.js 7.5.0 is the first version of Node.js to include a patch to
Expand Down Expand Up @@ -43167,6 +43156,10 @@ function supportsColor(stream) {
return 1;
}

if (env.TERM === 'dumb') {
return min;
}

return min;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-spec-to-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"homepage": "https://github.com/jbudz/spec-to-console#readme",
"devDependencies": {
"jest": "^24.9.0",
"jest": "^25.1.0",
"prettier": "^1.19.1"
},
"dependencies": {
Expand Down
16 changes: 10 additions & 6 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ class FakeApp implements App {
const store = new Map();
const originalLocalStorage = window.localStorage;

(window as any).localStorage = {
setItem: (key: string, value: string) => store.set(String(key), String(value)),
getItem: (key: string) => store.get(String(key)),
removeItem: (key: string) => store.delete(String(key)),
};

function defaultStartDeps(availableApps?: App[]) {
const deps = {
application: applicationServiceMock.createInternalStartContract(),
Expand Down Expand Up @@ -82,6 +76,16 @@ async function start({
};
}

beforeAll(() => {
// @ts-ignore
delete window.localStorage;
(window as any).localStorage = {
patrykkopycinski marked this conversation as resolved.
Show resolved Hide resolved
setItem: (key: string, value: string) => store.set(String(key), String(value)),
getItem: (key: string) => store.get(String(key)),
removeItem: (key: string) => store.delete(String(key)),
};
});

beforeEach(() => {
store.clear();
window.history.pushState(undefined, '', '#/home?a=b');
Expand Down
44 changes: 34 additions & 10 deletions src/core/public/fatal_errors/fatal_errors_screen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,43 @@ const noop = () => {
// noop
};

const { location, addEventListener } = window;

beforeAll(() => {
delete window.location;
delete window.addEventListener;

window.addEventListener = jest.fn();
// @ts-ignore
window.location = {
patrykkopycinski marked this conversation as resolved.
Show resolved Hide resolved
reload: jest.fn(),
};
});

afterEach(() => {
jest.restoreAllMocks();
});

afterAll(() => {
window.location = location;
window.addEventListener = addEventListener;
});

describe('reloading', () => {
it('refreshes the page if a `hashchange` event is emitted', () => {
const addEventListenerSpy = jest.spyOn(window, 'addEventListener');

const locationReloadSpy = jest.spyOn(window.location, 'reload').mockImplementation(noop);

shallowWithIntl(<FatalErrorsScreen {...defaultProps} />);
expect(addEventListenerSpy).toHaveBeenCalledTimes(1);
expect(addEventListenerSpy).toHaveBeenCalledWith('hashchange', expect.any(Function), undefined);

expect(locationReloadSpy).not.toHaveBeenCalled();
const [, handler] = addEventListenerSpy.mock.calls[0];
expect(window.addEventListener).toHaveBeenCalledTimes(1);
expect(window.addEventListener).toHaveBeenCalledWith(
'hashchange',
expect.any(Function),
undefined
);

expect(window.location.reload).not.toHaveBeenCalled();
// @ts-ignore
const [, handler] = window.addEventListener.mock.calls[0];
(handler as jest.Mock)();
expect(locationReloadSpy).toHaveBeenCalledTimes(1);
expect(window.location.reload).toHaveBeenCalledTimes(1);
});
});

Expand Down Expand Up @@ -91,6 +110,11 @@ describe('rendering', () => {

describe('buttons', () => {
beforeAll(() => {
// @ts-ignore
delete window.localStorage;
// @ts-ignore
delete window.sessionStorage;

Object.assign(window, {
localStorage: {
clear: jest.fn(),
Expand Down
4 changes: 2 additions & 2 deletions src/dev/jest/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

import jest from 'jest';
import { run } from 'jest';

jest.run(process.argv.slice(2));
run(process.argv.slice(2));

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading