* Update sinon related packages * fix stub types to be compatible # Conflicts: # x-pack/package.json
This commit is contained in:
parent
07d3fdcc0f
commit
62bbd9ff26
|
@ -335,7 +335,7 @@
|
|||
"@types/rimraf": "^2.0.2",
|
||||
"@types/selenium-webdriver": "^3.0.16",
|
||||
"@types/semver": "^5.5.0",
|
||||
"@types/sinon": "^7.0.0",
|
||||
"@types/sinon": "^7.0.13",
|
||||
"@types/strip-ansi": "^3.0.0",
|
||||
"@types/styled-components": "^3.0.2",
|
||||
"@types/supertest": "^2.0.5",
|
||||
|
@ -431,7 +431,7 @@
|
|||
"sass-lint": "^1.12.1",
|
||||
"selenium-webdriver": "^4.0.0-alpha.4",
|
||||
"simple-git": "1.116.0",
|
||||
"sinon": "^7.2.2",
|
||||
"sinon": "^7.4.2",
|
||||
"strip-ansi": "^3.0.1",
|
||||
"supertest": "^3.1.0",
|
||||
"supertest-as-promised": "^4.0.2",
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
"redux-thunk": "2.2.0",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"sass-loader": "^7.3.1",
|
||||
"sinon": "^7.2.2",
|
||||
"sinon": "^7.4.2",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.39.2",
|
||||
"webpack-dev-server": "^3.8.0",
|
||||
|
|
|
@ -13,7 +13,7 @@ describe('fillPool', () => {
|
|||
const tasks = [[1, 2, 3], [4, 5]];
|
||||
let index = 0;
|
||||
const fetchAvailableTasks = async () => tasks[index++] || [];
|
||||
const run = sinon.spy(() => true);
|
||||
const run = sinon.spy(async () => true);
|
||||
const converter = _.identity;
|
||||
|
||||
await fillPool(run, fetchAvailableTasks, converter);
|
||||
|
@ -25,7 +25,7 @@ describe('fillPool', () => {
|
|||
const tasks = [[1, 2, 3], [4, 5]];
|
||||
let index = 0;
|
||||
const fetchAvailableTasks = async () => tasks[index++] || [];
|
||||
const run = sinon.spy(() => false);
|
||||
const run = sinon.spy(async () => false);
|
||||
const converter = _.identity;
|
||||
|
||||
await fillPool(run, fetchAvailableTasks, converter);
|
||||
|
@ -37,7 +37,7 @@ describe('fillPool', () => {
|
|||
const tasks = [[1, 2, 3], [4, 5]];
|
||||
let index = 0;
|
||||
const fetchAvailableTasks = async () => tasks[index++] || [];
|
||||
const run = sinon.spy(() => false);
|
||||
const run = sinon.spy(async () => false);
|
||||
const converter = (x: number) => x.toString();
|
||||
|
||||
await fillPool(run, fetchAvailableTasks, converter);
|
||||
|
@ -47,7 +47,7 @@ describe('fillPool', () => {
|
|||
|
||||
describe('error handling', () => {
|
||||
test('throws exception from fetchAvailableTasks', async () => {
|
||||
const run = sinon.spy(() => false);
|
||||
const run = sinon.spy(async () => false);
|
||||
const converter = (x: number) => x.toString();
|
||||
|
||||
try {
|
||||
|
@ -80,7 +80,7 @@ describe('fillPool', () => {
|
|||
const tasks = [[1, 2, 3], [4, 5]];
|
||||
let index = 0;
|
||||
const fetchAvailableTasks = async () => tasks[index++] || [];
|
||||
const run = sinon.spy(() => false);
|
||||
const run = sinon.spy(async () => false);
|
||||
const converter = (x: number) => {
|
||||
throw new Error(`can not convert ${x}`);
|
||||
};
|
||||
|
|
|
@ -71,11 +71,13 @@ describe('TaskPool', () => {
|
|||
const firstRun = sinon.spy(async () => {
|
||||
await sleep(0);
|
||||
firstWork.resolve();
|
||||
return { state: {} };
|
||||
});
|
||||
const secondWork = resolvable();
|
||||
const secondRun = sinon.spy(async () => {
|
||||
await sleep(0);
|
||||
secondWork.resolve();
|
||||
return { state: {} };
|
||||
});
|
||||
|
||||
const result = await pool.run([
|
||||
|
@ -192,7 +194,10 @@ describe('TaskPool', () => {
|
|||
});
|
||||
|
||||
function mockRun() {
|
||||
return sinon.spy(async () => sleep(0));
|
||||
return sinon.spy(async () => {
|
||||
await sleep(0);
|
||||
return { state: {} };
|
||||
});
|
||||
}
|
||||
|
||||
function mockTask() {
|
||||
|
|
|
@ -159,7 +159,7 @@ describe('TaskStore', () => {
|
|||
|
||||
describe('fetch', () => {
|
||||
async function testFetch(opts?: FetchOpts, hits: any[] = []) {
|
||||
const callCluster = sinon.spy(async () => ({ hits: { hits } }));
|
||||
const callCluster = sinon.spy(async (name: string, params?: any) => ({ hits: { hits } }));
|
||||
const store = new TaskStore({
|
||||
index: 'tasky',
|
||||
serializer,
|
||||
|
@ -328,7 +328,7 @@ describe('TaskStore', () => {
|
|||
|
||||
describe('fetchAvailableTasks', () => {
|
||||
async function testFetchAvailableTasks({ opts = {}, hits = [] }: any = {}) {
|
||||
const callCluster = sinon.spy(async () => ({ hits: { hits } }));
|
||||
const callCluster = sinon.spy(async (name: string, params?: any) => ({ hits: { hits } }));
|
||||
const store = new TaskStore({
|
||||
callCluster,
|
||||
logger: mockLogger(),
|
||||
|
@ -350,7 +350,7 @@ describe('TaskStore', () => {
|
|||
}
|
||||
|
||||
test('it returns normally with no tasks when the index does not exist.', async () => {
|
||||
const callCluster = sinon.spy(async () => ({ hits: { hits: [] } }));
|
||||
const callCluster = sinon.spy(async (name: string, params?: any) => ({ hits: { hits: [] } }));
|
||||
const store = new TaskStore({
|
||||
index: 'tasky',
|
||||
serializer,
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
"@types/reduce-reducers": "^0.3.0",
|
||||
"@types/redux-actions": "^2.2.1",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/sinon": "^7.0.0",
|
||||
"@types/sinon": "^7.0.13",
|
||||
"@types/storybook__addon-actions": "^3.4.2",
|
||||
"@types/storybook__addon-info": "^4.1.1",
|
||||
"@types/storybook__addon-knobs": "^4.0.4",
|
||||
|
@ -165,7 +165,7 @@
|
|||
"run-sequence": "^2.2.1",
|
||||
"sass-loader": "^7.3.1",
|
||||
"simple-git": "1.116.0",
|
||||
"sinon": "^7.2.2",
|
||||
"sinon": "^7.4.2",
|
||||
"string-replace-loader": "^2.2.0",
|
||||
"supertest": "^3.1.0",
|
||||
"supertest-as-promised": "^4.0.2",
|
||||
|
|
94
yarn.lock
94
yarn.lock
|
@ -2414,28 +2414,34 @@
|
|||
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
|
||||
integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==
|
||||
|
||||
"@sinonjs/commons@^1.0.2", "@sinonjs/commons@^1.2.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.3.0.tgz#50a2754016b6f30a994ceda6d9a0a8c36adda849"
|
||||
integrity sha512-j4ZwhaHmwsCb4DlDOIWnI5YyKDNMoNThsmwEpfHx6a1EpsGZ9qYLxP++LMlmBRjtGptGHFsGItJ768snllFWpA==
|
||||
"@sinonjs/commons@^1", "@sinonjs/commons@^1.3.0", "@sinonjs/commons@^1.4.0":
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.6.0.tgz#ec7670432ae9c8eb710400d112c201a362d83393"
|
||||
integrity sha512-w4/WHG7C4WWFyE5geCieFJF6MZkbW4VAriol5KlmQXpAQdxvV0p26sqNZOW6Qyw6Y0l9K4g+cHvvczR2sEEpqg==
|
||||
dependencies:
|
||||
type-detect "4.0.8"
|
||||
|
||||
"@sinonjs/formatio@^3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/formatio/-/formatio-3.1.0.tgz#6ac9d1eb1821984d84c4996726e45d1646d8cce5"
|
||||
integrity sha512-ZAR2bPHOl4Xg6eklUGpsdiIJ4+J1SNag1DHHrG/73Uz/nVwXqjgUtRPLoS+aVyieN9cSbc0E4LsU984tWcDyNg==
|
||||
"@sinonjs/formatio@^3.2.1":
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/formatio/-/formatio-3.2.1.tgz#52310f2f9bcbc67bdac18c94ad4901b95fde267e"
|
||||
integrity sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==
|
||||
dependencies:
|
||||
"@sinonjs/samsam" "^2 || ^3"
|
||||
"@sinonjs/commons" "^1"
|
||||
"@sinonjs/samsam" "^3.1.0"
|
||||
|
||||
"@sinonjs/samsam@^2 || ^3", "@sinonjs/samsam@^3.0.2":
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-3.0.2.tgz#304fb33bd5585a0b2df8a4c801fcb47fa84d8e43"
|
||||
integrity sha512-m08g4CS3J6lwRQk1pj1EO+KEVWbrbXsmi9Pw0ySmrIbcVxVaedoFgLvFsV8wHLwh01EpROVz3KvVcD1Jmks9FQ==
|
||||
"@sinonjs/samsam@^3.1.0", "@sinonjs/samsam@^3.3.3":
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-3.3.3.tgz#46682efd9967b259b81136b9f120fd54585feb4a"
|
||||
integrity sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==
|
||||
dependencies:
|
||||
"@sinonjs/commons" "^1.0.2"
|
||||
"@sinonjs/commons" "^1.3.0"
|
||||
array-from "^2.1.1"
|
||||
lodash.get "^4.4.2"
|
||||
lodash "^4.17.15"
|
||||
|
||||
"@sinonjs/text-encoding@^0.7.1":
|
||||
version "0.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
|
||||
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
|
||||
|
||||
"@slack/client@^4.8.0":
|
||||
version "4.8.0"
|
||||
|
@ -4038,10 +4044,10 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/sinon@^7.0.0":
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-7.0.3.tgz#f8647e883d873962130f906a6114a4e187755696"
|
||||
integrity sha512-cjmJQLx2B5Hp9SzO7rdSivipo3kBqRqeYkTW17nLST1tn5YLWBjTdnzdmeTJXA1+KrrBLsEuvKQ0fUPGrfazQg==
|
||||
"@types/sinon@^7.0.13":
|
||||
version "7.0.13"
|
||||
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-7.0.13.tgz#ca039c23a9e27ebea53e0901ef928ea2a1a6d313"
|
||||
integrity sha512-d7c/C/+H/knZ3L8/cxhicHUiTDxdgap0b/aNJfsmLwFu/iOP17mdgbQsbHA3SJmrzsjD0l3UEE5SN4xxuz5ung==
|
||||
|
||||
"@types/stack-utils@^1.0.1":
|
||||
version "1.0.1"
|
||||
|
@ -18699,15 +18705,10 @@ loglevelnext@^1.0.1:
|
|||
es6-symbol "^3.1.1"
|
||||
object.assign "^4.1.0"
|
||||
|
||||
lolex@^2.3.2:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.6.0.tgz#cf9166f3c9dece3cdeb5d6b01fce50f14a1203e3"
|
||||
integrity sha512-e1UtIo1pbrIqEXib/yMjHciyqkng5lc0rrIbytgjmRgDR9+2ceNIAcwOWSgylRjoEP9VdVguCSRwnNmlbnOUwA==
|
||||
|
||||
lolex@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lolex/-/lolex-3.0.0.tgz#f04ee1a8aa13f60f1abd7b0e8f4213ec72ec193e"
|
||||
integrity sha512-hcnW80h3j2lbUfFdMArd5UPA/vxZJ+G8vobd+wg3nVEQA0EigStbYcrG030FJxL6xiDDPEkoMatV9xIh5OecQQ==
|
||||
lolex@^4.1.0, lolex@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lolex/-/lolex-4.2.0.tgz#ddbd7f6213ca1ea5826901ab1222b65d714b3cd7"
|
||||
integrity sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==
|
||||
|
||||
long@^2.4.0:
|
||||
version "2.4.0"
|
||||
|
@ -20060,16 +20061,16 @@ nigel@3.x.x:
|
|||
hoek "5.x.x"
|
||||
vise "3.x.x"
|
||||
|
||||
nise@^1.4.7:
|
||||
version "1.4.8"
|
||||
resolved "https://registry.yarnpkg.com/nise/-/nise-1.4.8.tgz#ce91c31e86cf9b2c4cac49d7fcd7f56779bfd6b0"
|
||||
integrity sha512-kGASVhuL4tlAV0tvA34yJYZIVihrUt/5bDwpp4tTluigxUr2bBlJeDXmivb6NuEdFkqvdv/Ybb9dm16PSKUhtw==
|
||||
nise@^1.5.2:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/nise/-/nise-1.5.2.tgz#b6d29af10e48b321b307e10e065199338eeb2652"
|
||||
integrity sha512-/6RhOUlicRCbE9s+94qCUsyE+pKlVJ5AhIv+jEE7ESKwnbXqulKZ1FYU+XAtHHWE9TinYvAxDUJAb912PwPoWA==
|
||||
dependencies:
|
||||
"@sinonjs/formatio" "^3.1.0"
|
||||
"@sinonjs/formatio" "^3.2.1"
|
||||
"@sinonjs/text-encoding" "^0.7.1"
|
||||
just-extend "^4.0.2"
|
||||
lolex "^2.3.2"
|
||||
lolex "^4.1.0"
|
||||
path-to-regexp "^1.7.0"
|
||||
text-encoding "^0.6.4"
|
||||
|
||||
no-case@^2.2.0, no-case@^2.3.2:
|
||||
version "2.3.2"
|
||||
|
@ -25676,17 +25677,17 @@ simplify-js@^1.2.1:
|
|||
resolved "https://registry.yarnpkg.com/simplify-js/-/simplify-js-1.2.3.tgz#a3422c1b9884d60421345eb44d2b872662df27f5"
|
||||
integrity sha512-0IkEqs+5c5vROkHaifGfbqHf5tYDcsTBy6oJPRbFCSwp2uzEr+PpH3dNP7wD8O3d7zdUCjLVq1/xHkwA/JjlFA==
|
||||
|
||||
sinon@^7.2.2:
|
||||
version "7.2.2"
|
||||
resolved "https://registry.yarnpkg.com/sinon/-/sinon-7.2.2.tgz#388ecabd42fa93c592bfc71d35a70894d5a0ca07"
|
||||
integrity sha512-WLagdMHiEsrRmee3jr6IIDntOF4kbI6N2pfbi8wkv50qaUQcBglkzkjtoOEbeJ2vf1EsrHhLI+5Ny8//WHdMoA==
|
||||
sinon@^7.4.2:
|
||||
version "7.4.2"
|
||||
resolved "https://registry.yarnpkg.com/sinon/-/sinon-7.4.2.tgz#ecd54158fef2fcfbdb231a3fa55140e8cb02ad6c"
|
||||
integrity sha512-pY5RY99DKelU3pjNxcWo6XqeB1S118GBcVIIdDi6V+h6hevn1izcg2xv1hTHW/sViRXU7sUOxt4wTUJ3gsW2CQ==
|
||||
dependencies:
|
||||
"@sinonjs/commons" "^1.2.0"
|
||||
"@sinonjs/formatio" "^3.1.0"
|
||||
"@sinonjs/samsam" "^3.0.2"
|
||||
"@sinonjs/commons" "^1.4.0"
|
||||
"@sinonjs/formatio" "^3.2.1"
|
||||
"@sinonjs/samsam" "^3.3.3"
|
||||
diff "^3.5.0"
|
||||
lolex "^3.0.0"
|
||||
nise "^1.4.7"
|
||||
lolex "^4.2.0"
|
||||
nise "^1.5.2"
|
||||
supports-color "^5.5.0"
|
||||
|
||||
sisteransi@^1.0.0:
|
||||
|
@ -27186,11 +27187,6 @@ test-exclude@^5.2.3:
|
|||
read-pkg-up "^4.0.0"
|
||||
require-main-filename "^2.0.0"
|
||||
|
||||
text-encoding@^0.6.4:
|
||||
version "0.6.4"
|
||||
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
|
||||
integrity sha1-45mpgiV6J22uQou5KEXLcb3CbRk=
|
||||
|
||||
text-hex@1.0.x:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5"
|
||||
|
|
Loading…
Reference in a new issue