New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stryker

Package Overview
Dependencies
Maintainers
3
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stryker - npm Package Compare versions

Comparing version 0.28.0 to 0.29.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="0.29.0"></a>
# [0.29.0](https://github.com/stryker-mutator/stryker/compare/stryker@0.28.0...stryker@0.29.0) (2018-08-21)
### Features
* **stryker config:** rename config setting `timeoutMs` to `timeoutMS` ([#1099](https://github.com/stryker-mutator/stryker/issues/1099)) ([3ded998](https://github.com/stryker-mutator/stryker/commit/3ded998)), closes [#860](https://github.com/stryker-mutator/stryker/issues/860)
<a name="0.28.0"></a>

@@ -8,0 +19,0 @@ # [0.28.0](https://github.com/stryker-mutator/stryker/compare/stryker@0.27.1...stryker@0.28.0) (2018-08-19)

8

package.json
{
"name": "stryker",
"version": "0.28.0",
"version": "0.29.0",
"description": "The extendable JavaScript mutation testing framework",

@@ -79,3 +79,3 @@ "main": "src/Stryker.js",

"devDependencies": {
"@types/get-port": "~3.2.0",
"@types/get-port": "~4.0.0",
"@types/inquirer": "~0.0.42",

@@ -86,7 +86,7 @@ "@types/istanbul-lib-instrument": "~1.7.0",

"@types/progress": "~2.0.1",
"stryker-api": "^0.20.0"
"stryker-api": "^0.21.0"
},
"peerDependencies": {
"stryker-api": ">=0.18.0 <0.21.0"
"stryker-api": ">=0.18.0 <0.22.0"
}
}

@@ -262,4 +262,4 @@ [![Build Status](https://travis-ci.org/stryker-mutator/stryker.svg?branch=master)](https://travis-ci.org/stryker-mutator/stryker)

#### Global timeout in milliseconds
**Command line:** `--timeoutMs 5000`
**Config file:** `timeoutMs: 5000`
**Command line:** `--timeoutMS 5000`
**Config file:** `timeoutMS: 5000`
**Default value:** `5000`

@@ -269,7 +269,7 @@ **Mandatory**: no

When Stryker is mutating code, it cannot determine indefinitely whether or not a code mutation results in an infinite loop (see [Halting problem](https://en.wikipedia.org/wiki/Halting_problem)).
In order to battle infinite loops, a test run gets killed after a certain period of time. This period is configurable with two settings: `timeoutMs` and `timeoutFactor`.
In order to battle infinite loops, a test run gets killed after a certain period of time. This period is configurable with two settings: `timeoutMS` and `timeoutFactor`.
To calculate the actual timeout in milliseconds the, following formula is used:
```
timeoutForTestRunMs = netTimeMs * timeoutFactor + timeoutMs + overheadMs
timeoutForTestRunMs = netTimeMs * timeoutFactor + timeoutMS + overheadMs
```

@@ -280,3 +280,3 @@

With `timeoutFactor` you can configure the allowed deviation relative to the time of a normal test run. Tweak this if you notice that mutants are prone to creating slower code, but not infinite loops.
`timeoutMs` lets you configure an absolute deviation. Use it, if you run Stryker on a busy machine and you need to wait longer to make sure that the code indeed entered an infinite loop.
`timeoutMS` lets you configure an absolute deviation. Use it, if you run Stryker on a busy machine and you need to wait longer to make sure that the code indeed entered an infinite loop.

@@ -283,0 +283,0 @@ #### Timeout factor

@@ -40,2 +40,6 @@ "use strict";

}
if (config.timeoutMs) {
config.timeoutMS = config.timeoutMs;
this.log.warn("DEPRECATED: please change the config setting 'timeoutMs: " + config.timeoutMs + "' into 'timeoutMS: " + config.timeoutMS + "'");
}
return config;

@@ -42,0 +46,0 @@ };

@@ -74,3 +74,3 @@ "use strict";

ConfigValidator.prototype.validateTimeout = function () {
this.validateIsNumber('timeoutMs', this.strykerConfig.timeoutMs);
this.validateIsNumber('timeoutMS', this.strykerConfig.timeoutMS);
this.validateIsNumber('timeoutFactor', this.strykerConfig.timeoutFactor);

@@ -77,0 +77,0 @@ };

@@ -33,3 +33,3 @@ import { RunResult } from 'stryker-api/test_runner';

* The overhead time is used to calculate exact timeout values during mutation testing.
* See timeoutMs setting in README for more information on this calculation
* See timeoutMS setting in README for more information on this calculation
*/

@@ -36,0 +36,0 @@ private calculateTiming;

@@ -136,3 +136,3 @@ "use strict";

* The overhead time is used to calculate exact timeout values during mutation testing.
* See timeoutMs setting in README for more information on this calculation
* See timeoutMS setting in README for more information on this calculation
*/

@@ -139,0 +139,0 @@ InitialTestExecutor.prototype.calculateTiming = function (grossTimeMS, tests) {

@@ -144,3 +144,3 @@ "use strict";

var baseTimeout = mutant.timeSpentScopedTests;
return (this.options.timeoutFactor * baseTimeout) + this.options.timeoutMs + this.timeOverheadMS;
return (this.options.timeoutFactor * baseTimeout) + this.options.timeoutMS + this.timeOverheadMS;
};

@@ -147,0 +147,0 @@ Sandbox.prototype.getFilterTestsHooks = function (mutant) {

@@ -39,3 +39,3 @@ "use strict";

.option('--port <n>', 'A free port for the test runner to use (if it needs to). Any additional test runners will be spawned using n+1, n+2, etc', parseInt)
.option('--timeoutMs <number>', 'Tweak the absolute timeout used to wait for a test runner to complete', parseInt)
.option('--timeoutMS <number>', 'Tweak the absolute timeout used to wait for a test runner to complete', parseInt)
.option('--timeoutFactor <number>', 'Tweak the standard deviation relative to the normal test run of a mutated test', parseFloat)

@@ -42,0 +42,0 @@ .option('--maxConcurrentTestRunners <n>', 'Set the number of max concurrent test runner to spawn (default: cpuCount)', parseInt)

@@ -6,4 +6,4 @@ /// <reference types="get-port" />

export declare const getFreePort: (options?: {
port?: number | undefined;
port?: number | ReadonlyArray<number> | undefined;
host?: string | undefined;
} | undefined) => PromiseLike<number>;
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc