diff --git a/package.json b/package.json index ac64f90fa16..403b4533b06 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@types/file-saver": "2.0.1", "@types/history": "^4.7.8", "@types/hoist-non-react-statics": "3.3.1", - "@types/jest": "26.0.15", + "@types/jest": "27.0.2", "@types/jquery": "3.3.38", "@types/jsurl": "^1.2.28", "@types/lodash": "4.14.149", diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index b66359958f9..ac296683eed 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -38,7 +38,7 @@ "@rollup/plugin-json": "4.1.0", "@rollup/plugin-node-resolve": "10.0.0", "@types/braintree__sanitize-url": "4.1.0", - "@types/jest": "26.0.15", + "@types/jest": "27.0.2", "@types/jquery": "3.3.38", "@types/lodash": "4.14.123", "@types/marked": "1.1.0", diff --git a/packages/grafana-runtime/package.json b/packages/grafana-runtime/package.json index 2f325dd228a..3cb851e3080 100644 --- a/packages/grafana-runtime/package.json +++ b/packages/grafana-runtime/package.json @@ -36,7 +36,7 @@ "@rollup/plugin-commonjs": "16.0.0", "@rollup/plugin-node-resolve": "10.0.0", "@types/history": "^4.7.8", - "@types/jest": "26.0.15", + "@types/jest": "27.0.2", "@types/rollup-plugin-visualizer": "4.2.1", "@types/systemjs": "^0.20.6", "lodash": "4.17.21", diff --git a/packages/grafana-toolkit/package.json b/packages/grafana-toolkit/package.json index c262da91434..4bb218fce31 100644 --- a/packages/grafana-toolkit/package.json +++ b/packages/grafana-toolkit/package.json @@ -36,7 +36,7 @@ "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.13", "@types/inquirer": "^6.0.3", - "@types/jest": "26.0.15", + "@types/jest": "27.0.2", "@types/node": "^14.0.0", "@types/prettier": "^2.4.0", "@types/react-dev-utils": "^9.0.4", diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 25b1c2ed97d..71974b9820e 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -96,7 +96,7 @@ "@types/d3": "7.0.0", "@types/hoist-non-react-statics": "3.3.1", "@types/is-hotkey": "0.1.1", - "@types/jest": "26.0.15", + "@types/jest": "27.0.2", "@types/jquery": "3.3.38", "@types/lodash": "4.14.123", "@types/mock-raf": "1.0.2", diff --git a/public/app/plugins/datasource/mixed/MixedDataSource.test.ts b/public/app/plugins/datasource/mixed/MixedDataSource.test.ts index 455b081aeef..a1232ba9869 100644 --- a/public/app/plugins/datasource/mixed/MixedDataSource.test.ts +++ b/public/app/plugins/datasource/mixed/MixedDataSource.test.ts @@ -34,15 +34,17 @@ describe('MixedDatasource', () => { }); const results: any[] = []; - beforeEach(async (done) => { - const ds = await getDataSourceSrv().get('-- Mixed --'); - - from(ds.query(requestMixed)).subscribe((result) => { - results.push(result); - if (result.state === LoadingState.Done) { - done(); - } - }); + beforeEach((done) => { + getDataSourceSrv() + .get('-- Mixed --') + .then((ds) => { + from(ds.query(requestMixed)).subscribe((result) => { + results.push(result); + if (result.state === LoadingState.Done) { + done(); + } + }); + }); }); it('direct query should return results', async () => { @@ -68,15 +70,17 @@ describe('MixedDatasource', () => { }); const results: any[] = []; - beforeEach(async (done) => { - const ds = await getDataSourceSrv().get('-- Mixed --'); - - from(ds.query(requestMixed)).subscribe((result) => { - results.push(result); - if (results.length === 5) { - done(); - } - }); + beforeEach((done) => { + getDataSourceSrv() + .get('-- Mixed --') + .then((ds) => { + from(ds.query(requestMixed)).subscribe((result) => { + results.push(result); + if (results.length === 5) { + done(); + } + }); + }); }); it('direct query should return results', async () => { diff --git a/yarn.lock b/yarn.lock index b1458067172..1f25c96a81e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2379,7 +2379,7 @@ __metadata: "@rollup/plugin-node-resolve": 10.0.0 "@types/braintree__sanitize-url": 4.1.0 "@types/d3-interpolate": ^1.3.1 - "@types/jest": 26.0.15 + "@types/jest": 27.0.2 "@types/jquery": 3.3.38 "@types/lodash": 4.14.123 "@types/marked": 1.1.0 @@ -2494,7 +2494,7 @@ __metadata: "@rollup/plugin-commonjs": 16.0.0 "@rollup/plugin-node-resolve": 10.0.0 "@types/history": ^4.7.8 - "@types/jest": 26.0.15 + "@types/jest": 27.0.2 "@types/rollup-plugin-visualizer": 4.2.1 "@types/systemjs": ^0.20.6 history: 4.10.1 @@ -2572,7 +2572,7 @@ __metadata: "@types/command-exists": ^1.2.0 "@types/fs-extra": ^9.0.13 "@types/inquirer": ^6.0.3 - "@types/jest": 26.0.15 + "@types/jest": 27.0.2 "@types/node": ^14.0.0 "@types/prettier": ^2.4.0 "@types/react-dev-utils": ^9.0.4 @@ -2680,7 +2680,7 @@ __metadata: "@types/d3": 7.0.0 "@types/hoist-non-react-statics": 3.3.1 "@types/is-hotkey": 0.1.1 - "@types/jest": 26.0.15 + "@types/jest": 27.0.2 "@types/jquery": 3.3.38 "@types/lodash": 4.14.123 "@types/mock-raf": 1.0.2 @@ -7568,7 +7568,7 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:*": +"@types/jest@npm:*, @types/jest@npm:27.0.2": version: 27.0.2 resolution: "@types/jest@npm:27.0.2" dependencies: @@ -7578,16 +7578,6 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:26.0.15": - version: 26.0.15 - resolution: "@types/jest@npm:26.0.15" - dependencies: - jest-diff: ^26.0.0 - pretty-format: ^26.0.0 - checksum: 5bbed3d3afa40bcac9eb2e8e76957b40b7cb86228a7a1dd455f7e30cb283a7314f7d7afaf2d46ca52ba5ce62168e0f60c57e0ab7509a6b91eab42460709b6bf1 - languageName: node - linkType: hard - "@types/jest@npm:26.x": version: 26.0.24 resolution: "@types/jest@npm:26.0.24" @@ -17645,7 +17635,7 @@ fsevents@~2.1.2: "@types/file-saver": 2.0.1 "@types/history": ^4.7.8 "@types/hoist-non-react-statics": 3.3.1 - "@types/jest": 26.0.15 + "@types/jest": 27.0.2 "@types/jquery": 3.3.38 "@types/jsurl": ^1.2.28 "@types/lodash": 4.14.149