mirror of
https://github.com/azure/login.git
synced 2026-06-06 19:47:08 +00:00
* Bump lodash from 4.17.15 to 4.17.19 (#52) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * Bump @actions/core from 1.1.3 to 1.2.6 (#60) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.1.3 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Amruta Kawade <65217380+AmrutaKawade@users.noreply.github.com> * updating node_nodules * updated package-lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51 lines
2 KiB
TypeScript
51 lines
2 KiB
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
import type { AggregatedResult } from '@jest/test-result';
|
|
import type { Context } from 'jest-runtime';
|
|
import type { Test } from 'jest-runner';
|
|
declare type Cache = {
|
|
[key: string]: [0 | 1, number];
|
|
};
|
|
/**
|
|
* The TestSequencer will ultimately decide which tests should run first.
|
|
* It is responsible for storing and reading from a local cache
|
|
* map that stores context information for a given test, such as how long it
|
|
* took to run during the last run and if it has failed or not.
|
|
* Such information is used on:
|
|
* TestSequencer.sort(tests: Array<Test>)
|
|
* to sort the order of the provided tests.
|
|
*
|
|
* After the results are collected,
|
|
* TestSequencer.cacheResults(tests: Array<Test>, results: AggregatedResult)
|
|
* is called to store/update this information on the cache map.
|
|
*/
|
|
export default class TestSequencer {
|
|
private _cache;
|
|
_getCachePath(context: Context): string;
|
|
_getCache(test: Test): Cache;
|
|
/**
|
|
* Sorting tests is very important because it has a great impact on the
|
|
* user-perceived responsiveness and speed of the test run.
|
|
*
|
|
* If such information is on cache, tests are sorted based on:
|
|
* -> Has it failed during the last run ?
|
|
* Since it's important to provide the most expected feedback as quickly
|
|
* as possible.
|
|
* -> How long it took to run ?
|
|
* Because running long tests first is an effort to minimize worker idle
|
|
* time at the end of a long test run.
|
|
* And if that information is not available they are sorted based on file size
|
|
* since big test files usually take longer to complete.
|
|
*
|
|
* Note that a possible improvement would be to analyse other information
|
|
* from the file other than its size.
|
|
*
|
|
*/
|
|
sort(tests: Array<Test>): Array<Test>;
|
|
cacheResults(tests: Array<Test>, results: AggregatedResult): void;
|
|
}
|
|
export {};
|