-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(IsolatedTestRunnerAdapter): Improve error handling when test runn…
…er worker process crashes (#285) * fix(IsolatedTestRunnerAdapter): Log why a child process crashed * chore(vscode): Refactor vscode config for new build * fix(runner-adapter): Reject promise when child process crashes * fix(integration-test): Split out the integration tests * Split out the integration tests and make sure they work with relative paths
- Loading branch information
Showing
21 changed files
with
162 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
integrationTest/test/module/package.json → ...ationTest/test/karma-jasmine/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var add = function(num1, num2) { | ||
return num1 + num2; | ||
}; | ||
|
||
var addOne = function(number) { | ||
number++; | ||
return number; | ||
}; | ||
|
||
var negate = function(number) { | ||
return -number; | ||
}; | ||
|
||
var notCovered = function(number) { | ||
return number > 10; | ||
}; | ||
|
||
var isNegativeNumber = function(number) { | ||
var isNegative = false; | ||
if(number < 0){ | ||
isNegative = true; | ||
} | ||
return isNegative; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var getCircumference = function(radius) { | ||
//Function to test multiple math mutations in a single function. | ||
return 2 * Math.PI * radius; | ||
}; | ||
|
||
var untestedFunction = function() { | ||
var i = 5 / 2 * 3; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = function(config){ | ||
config.set({ | ||
files: ['src/*.js', 'test/*.js'], | ||
mutate: ['src/*.js'], | ||
testFramework: 'jasmine', | ||
testRunner: 'karma' | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
describe('Add', function() { | ||
it('should be able to add two numbers', function() { | ||
var num1 = 2; | ||
var num2 = 5; | ||
var expected = num1 + num2; | ||
|
||
var actual = add(num1, num2); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
|
||
it('should be able 1 to a number', function() { | ||
var number = 2; | ||
var expected = 3; | ||
|
||
var actual = addOne(number); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
|
||
it('should be able negate a number', function() { | ||
var number = 2; | ||
var expected = -2; | ||
|
||
var actual = negate(number); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
|
||
it('should be able to recognize a negative number', function() { | ||
var number = -2; | ||
|
||
var isNegative = isNegativeNumber(number); | ||
|
||
expect(isNegative).toBe(true); | ||
}); | ||
|
||
it('should be able to recognize that 0 is not a negative number', function() { | ||
var number = 0; | ||
|
||
var isNegative = isNegativeNumber(number); | ||
|
||
expect(isNegative).toBe(false); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
describe('Circle', function() { | ||
it('should have a circumference of 2PI when the radius is 1', function() { | ||
var radius = 1; | ||
var expectedCircumference = 2 * Math.PI; | ||
|
||
var circumference = getCircumference(radius); | ||
|
||
expect(circumference).toBe(expectedCircumference); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
integrationTest/test/use-stryker-programmatically/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "use-stryker-programmatically", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"pretest": "tsc -p .", | ||
"test": "node usingStryker.js" | ||
} | ||
} |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
integrationTest/test/use-stryker-programmatically/usingStryker.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var stryker_1 = require("stryker"); | ||
new stryker_1.default({ mutateFiles: [], allFiles: [], coverageAnalysis: 'off' }).runMutationTest().then(function () { return console.log('done'); }); |
3 changes: 3 additions & 0 deletions
3
integrationTest/test/use-stryker-programmatically/usingStryker.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Stryker from 'stryker'; | ||
|
||
new Stryker({ mutateFiles: [], allFiles: [], coverageAnalysis: 'off'} ).runMutationTest().then(() => console.log('done')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "0.1.0", | ||
"command": "npm", | ||
"isShellCommand": true, | ||
"args": ["start"], | ||
"showOutput": "silent", | ||
"isBackground": true, | ||
"problemMatcher": "$tsc-watch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters