Socket
Socket
Sign inDemoInstall

@jest/test-sequencer

Package Overview
Dependencies
199
Maintainers
6
Versions
130
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 27.5.1 to 28.0.0-alpha.0

63

build/index.d.ts

@@ -7,7 +7,10 @@ /**

*/
import type { AggregatedResult, Test } from '@jest/test-result';
import type { Context } from 'jest-runtime';
declare type Cache = {
[key: string]: [0 | 1, number];
import type {AggregatedResult} from '@jest/test-result';
import type {Context} from 'jest-runtime';
import type {Test} from '@jest/test-result';
declare type Cache_2 = {
[key: string]: [0 | 1, number];
};
/**

@@ -26,28 +29,30 @@ * The TestSequencer will ultimately decide which tests should run first.

*/
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>;
allFailedTests(tests: Array<Test>): Array<Test>;
cacheResults(tests: Array<Test>, results: AggregatedResult): void;
declare class TestSequencer {
private _cache;
_getCachePath(context: Context): string;
_getCache(test: Test): Cache_2;
/**
* 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>;
allFailedTests(tests: Array<Test>): Array<Test>;
cacheResults(tests: Array<Test>, results: AggregatedResult): void;
}
export default TestSequencer;
export {};

@@ -74,16 +74,8 @@ 'use strict';

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
/**
* 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.
*/
const FAIL = 0;

@@ -106,5 +98,3 @@ const SUCCESS = 1;

class TestSequencer {
constructor() {
_defineProperty(this, '_cache', new Map());
}
_cache = new Map();

@@ -111,0 +101,0 @@ _getCachePath(context) {

{
"name": "@jest/test-sequencer",
"version": "27.5.1",
"version": "28.0.0-alpha.0",
"repository": {

@@ -20,6 +20,6 @@ "type": "git",

"dependencies": {
"@jest/test-result": "^27.5.1",
"@jest/test-result": "^28.0.0-alpha.0",
"graceful-fs": "^4.2.9",
"jest-haste-map": "^27.5.1",
"jest-runtime": "^27.5.1"
"jest-haste-map": "^28.0.0-alpha.0",
"jest-runtime": "^28.0.0-alpha.0"
},

@@ -30,3 +30,3 @@ "devDependencies": {

"engines": {
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
"node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0"
},

@@ -36,3 +36,3 @@ "publishConfig": {

},
"gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850"
"gitHead": "89275b08977065d98e42ad71fcf223f4ad169f09"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc