Skip to content
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"@types/glob": "^5.0.35",
"@types/hapi-latest": "npm:@types/hapi@17.0.12",
"@types/has-ansi": "^3.0.0",
"@types/jest": "^22.2.3",
"@types/jest": "^23.3.1",
"@types/joi": "^10.4.4",
"@types/jquery": "3.3.1",
"@types/js-yaml": "^3.11.1",
Expand All @@ -243,7 +243,7 @@
"@types/type-detect": "^4.0.1",
"angular-mocks": "1.4.7",
"babel-eslint": "8.1.2",
"babel-jest": "^22.4.3",
"babel-jest": "^23.4.2",
"backport": "4.4.1",
"chai": "3.5.0",
"chance": "1.0.10",
Expand All @@ -259,7 +259,7 @@
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-babel": "4.1.2",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jest": "^21.6.2",
"eslint-plugin-jest": "^21.22.0",
"eslint-plugin-mocha": "4.11.0",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "1.2.1",
Expand All @@ -284,8 +284,8 @@
"husky": "0.8.1",
"image-diff": "1.6.0",
"istanbul-instrumenter-loader": "3.0.0",
"jest": "^22.4.3",
"jest-cli": "^22.4.3",
"jest": "^23.5.0",
"jest-cli": "^23.5.0",
"jest-raw-loader": "^1.0.1",
"jimp": "0.2.28",
"jsdom": "9.9.1",
Expand Down Expand Up @@ -321,7 +321,7 @@
"supertest": "^3.1.0",
"supertest-as-promised": "^4.0.2",
"tree-kill": "^1.1.0",
"ts-jest": "^22.4.6",
"ts-jest": "^23.1.4",
"ts-loader": "^3.5.0",
"ts-node": "^6.0.3",
"tslint": "^5.10.0",
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 @@ -19,7 +19,7 @@
"eslint": "^4.1.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jest": "^21.0.0",
"eslint-plugin-jest": "^21.22.0",
"eslint-plugin-mocha": "^4.9.0",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eslint": "^4.11.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jest": "^21.3.2",
"eslint-plugin-jest": "^21.22.0",
"eslint-plugin-mocha": "^4.9.0",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-prefer-object-spread": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-pm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/globby": "^6.1.0",
"@types/has-ansi": "^3.0.0",
"@types/indent-string": "^3.0.0",
"@types/jest": "^22.1.3",
"@types/jest": "^23.3.1",
"@types/lodash.clonedeepwith": "^4.5.3",
"@types/log-symbols": "^2.0.0",
"@types/mkdirp": "^0.5.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-pm/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/indent-string/-/indent-string-3.0.0.tgz#9ebb391ceda548926f5819ad16405349641b999f"

"@types/jest@^22.1.3":
version "22.1.3"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.1.3.tgz#25da391935e6fac537551456f077ce03144ec168"
"@types/jest@^23.3.1":
version "23.3.1"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf"

"@types/lodash.clonedeepwith@^4.5.3":
version "4.5.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-system-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"kbn:bootstrap": "yarn build"
},
"devDependencies": {
"@types/jest": "^22.2.2",
"@types/jest": "^23.3.1",
"typescript": "^2.9.2"
}
}
6 changes: 3 additions & 3 deletions packages/kbn-system-loader/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# yarn lockfile v1


"@types/jest@^22.2.2":
version "22.2.2"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.2.2.tgz#afe5dacbd00d65325f52da0ed3e76e259629ac9d"
"@types/jest@^23.3.1":
version "23.3.1"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf"

typescript@^2.9.2:
version "2.9.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('getIndices', () => {

it('should throw exceptions', async () => {
const es = {
search: () => { throw 'Fail'; }
search: () => { throw new Error('Fail'); }
};

await expect(getIndices(es, 'kibana', 1)).rejects.toThrow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function getIndices(es, rawPattern, limit) {

// We need to always provide a limit and not rely on the default
if (!limit) {
throw '`getIndices()` was called without the required `limit` parameter.';
throw new Error('`getIndices()` was called without the required `limit` parameter.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

const params = {
Expand Down
2 changes: 2 additions & 0 deletions src/dev/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ export default {
'default',
'<rootDir>/src/dev/jest/junit_reporter.js',
],
// TODO: prevent tests from making web requests that rely on this setting, see https://github.com/facebook/jest/pull/6792
testURL: 'about:blank',
};
4 changes: 3 additions & 1 deletion x-pack/dev-tools/jest/create_jest_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export function createJestConfig({
reportName: 'X-Pack Jest Tests',
rootDirectory: xPackKibanaDirectory,
}]
]
],
// TODO: prevent tests from making web requests that rely on this setting, see https://github.com/facebook/jest/pull/6792
testURL: 'about:blank',
};
}
12 changes: 6 additions & 6 deletions x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"@kbn/es": "link:../packages/kbn-es",
"@kbn/plugin-helpers": "link:../packages/kbn-plugin-helpers",
"@kbn/test": "link:../packages/kbn-test",
"@types/jest": "^22.2.3",
"@types/jest": "^23.3.1",
"@types/pngjs": "^3.3.1",
"abab": "^1.0.4",
"ansicolors": "0.3.2",
"aws-sdk": "2.2.33",
"axios": "^0.18.0",
"babel-jest": "^22.4.3",
"babel-jest": "^23.4.2",
"chalk": "^2.4.1",
"chance": "1.0.10",
"checksum": "0.1.1",
Expand All @@ -52,9 +52,9 @@
"gulp-util": "3.0.7",
"gulp-zip": "3.1.0",
"hapi": "14.2.0",
"jest": "^22.4.3",
"jest-cli": "^22.4.3",
"jest-styled-components": "^5.0.1",
"jest": "^23.5.0",
"jest-cli": "^23.5.0",
"jest-styled-components": "^6.1.1",
"mocha": "3.3.0",
"mustache": "^2.3.0",
"mutation-observer": "^1.0.3",
Expand Down Expand Up @@ -170,4 +170,4 @@
"engines": {
"yarn": "^1.6.0"
}
}
}
Loading