-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a seed project for stryker plugins: * An empty shell for all 5 kinds of plugins in Stryker * An index file which registers the plugins using the Stryker way of plugin loading. * A bootstrap for testing using [mocha](https://mochajs.org), [sinon](http://sinonjs.org/) and [chai](http://chaijs.com/) * A correct list of dependencies to get you started with [TypeScript](http://typescriptlang.org/) * A simple build system using [Grunt](http://gruntjs.com) * A [vscode](https://code.visualstudio.com) configuration for easy running of the tests by hitting `f5`, inc debugging your typescript code.
- Loading branch information
0 parents
commit 5633910
Showing
21 changed files
with
741 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"critics": { | ||
"lint": { "engine": "tslint" }, | ||
"wc": { "limit": 3000 } | ||
}, | ||
"test": [ | ||
"test/**", | ||
"testResources/**" | ||
] | ||
} |
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 @@ | ||
# 2 space indentation | ||
[{*.ts,*.js,*.json}] | ||
indent_style = space | ||
indent_size = 2 |
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,14 @@ | ||
node_modules | ||
npm-debug.log | ||
coverage | ||
.tscache | ||
typings | ||
*.js.map | ||
src/**/*.js | ||
test/**/*.js | ||
src/**/*.d.ts | ||
test/**/*.d.ts | ||
*.js | ||
*.d.ts | ||
!Gruntfile.js | ||
!testResources |
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 @@ | ||
*.ts | ||
!*.d.ts | ||
Gruntfile.js | ||
test | ||
tsconfig.json | ||
typings.json | ||
testResources | ||
typings |
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 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "5" | ||
- "4" | ||
- "0.12" | ||
install: npm install | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start |
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,123 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run unit tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/node_modules/grunt/bin/grunt", | ||
// "preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"mochaTest:unit" | ||
], | ||
"cwd": "${workspaceRoot}/.", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run integration tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/node_modules/grunt-cli/bin/grunt", | ||
// "preLa4unchTask": "ts", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"mochaTest:integration" | ||
], | ||
"cwd": "${workspaceRoot}/.", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run stryker example", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/bin/stryker", | ||
"preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"--configFile", | ||
"testResources/sampleProject/stryker.conf.js", | ||
"--logLevel", | ||
"trace", | ||
"--testFramework", | ||
"jasmine" | ||
], | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run own dog food", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/bin/stryker", | ||
"preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"--configFile", | ||
"stryker.conf.js", | ||
"--logLevel", | ||
"info" | ||
], | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run stryker help", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/src/Stryker.js", | ||
"preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"--help" | ||
], | ||
"cwd": "${workspaceRoot}/.", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
} | ||
] | ||
} |
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,15 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"files": { | ||
"exclude": { | ||
".git": "", | ||
"**/*.js": { | ||
"when": "$(basename).ts" | ||
}, | ||
"**/*.d.ts": true, | ||
"**/*.map": { | ||
"when": "$(basename)" | ||
} | ||
} | ||
} | ||
} |
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,123 @@ | ||
'use strict'; | ||
|
||
|
||
module.exports = function (grunt) { | ||
|
||
require('load-grunt-tasks')(grunt); | ||
|
||
grunt.initConfig({ | ||
|
||
clean: { | ||
build: { | ||
src: ['+(test|src)/**/*+(.d.ts|.js|.map)'] | ||
}, | ||
coverage: { | ||
src: ['coverage'] | ||
} | ||
}, | ||
|
||
watch: { | ||
testFiles: { | ||
files: ['test/**/*.js', 'src/**/*.js'], | ||
tasks: ['mochaTest:unit'] | ||
} | ||
}, | ||
mochaTest: { | ||
unit: { | ||
options: { | ||
reporter: 'spec' | ||
}, | ||
// Register helpers before, it includes a log4js mock which has to be loaded as early as possible | ||
src: ['test/helpers/**/*.js', 'test/unit/**/*.js'] | ||
}, | ||
integration: { | ||
options: { | ||
reporter: 'spec', | ||
timeout: 5000 | ||
}, | ||
// Register helpers before, it includes a log4js mock which has to be loaded as early as possible | ||
src: ['test/helpers/**/*.js', 'test/integration/**/*.js'] | ||
} | ||
}, | ||
mocha_istanbul: { | ||
coverage: { | ||
// Register helpers before, it includes a log4js mock which has to be loaded as early as possible | ||
src: ['test/helpers/**/*.js', 'test/unit/**/*.js', 'test/integration/**/*.js'], | ||
} | ||
}, | ||
istanbul_check_coverage: { | ||
default: { | ||
options: { | ||
coverageFolder: 'coverage*', | ||
check: { | ||
lines: 80, | ||
statements: 80 | ||
} | ||
} | ||
} | ||
}, | ||
/* End code coverage */ | ||
|
||
ts: { | ||
options: { | ||
failOnTypeErrors: true | ||
}, | ||
build: { | ||
tsconfig: true, | ||
}, | ||
}, | ||
|
||
'npm-contributors': { | ||
options: { | ||
commitMessage: 'chore: update contributors' | ||
} | ||
}, | ||
conventionalChangelog: { | ||
release: { | ||
options: { | ||
changelogOpts: { | ||
preset: 'angular' | ||
} | ||
}, | ||
src: 'CHANGELOG.md' | ||
} | ||
}, | ||
bump: { | ||
options: { | ||
commitFiles: [ | ||
'package.json', | ||
'CHANGELOG.md' | ||
], | ||
commitMessage: 'chore: release v%VERSION%', | ||
prereleaseName: 'rc' | ||
} | ||
}, | ||
tslint: { | ||
src: { | ||
src: ['*.ts', 'src/**/*.ts'] | ||
}, | ||
test: { | ||
src: ['test/**/*.ts', 'testResources/module/*.ts'] | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('default', ['test']); | ||
grunt.registerTask('test', ['build', 'coverage']); | ||
grunt.registerTask('build', ['clean', 'tslint', 'ts']); | ||
grunt.registerTask('integration', ['mochaTest:integration']); | ||
grunt.registerTask('coverage', ['mocha_istanbul:coverage']); | ||
grunt.registerTask('serve', ['watch']); | ||
|
||
grunt.registerTask('release', 'Build, bump and publish to NPM.', function (type) { | ||
grunt.task.run([ | ||
'test', | ||
'npm-contributors', | ||
'bump:' + (type || 'patch') + ':bump-only', | ||
'conventionalChangelog', | ||
'bump-commit', | ||
'npm-publish' | ||
]); | ||
}); | ||
|
||
}; |
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,18 @@ | ||
[![Build Status](https://travis-ci.org/stryker-mutator/stryker-plugin-seed.svg?branch=master)](https://travis-ci.org/stryker-mutator/stryker-api) | ||
[![Gitter](https://badges.gitter.im/stryker-mutator/stryker.svg)](https://gitter.im/stryker-mutator/stryker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
|
||
![Stryker](https://github.com/stryker-mutator/stryker/raw/master/stryker-80x80.png) | ||
|
||
# Stryker Plugin Seed | ||
This project can be used as a blue print for writing plugins for [Stryker](http://stryker-mutator.github.io), the JavaScript mutation testing framework. | ||
|
||
This project contains: | ||
|
||
* An empty shell for all 5 kinds of plugins in Stryker | ||
* An index file which registers the plugins using the Stryker way of plugin loading. | ||
* A bootstrap for testing using [mocha](https://mochajs.org), [sinon](http://sinonjs.org/) and [chai](http://chaijs.com/) | ||
* A correct list of dependencies to get you started with [TypeScript](http://typescriptlang.org/) | ||
* A simple build system using [Grunt](http://gruntjs.com) | ||
* A [vscode](https://code.visualstudio.com) configuration for easy running of the tests by hitting `f5`, inc debugging your typescript code. | ||
|
||
**NOTE**: This seed is bootstrapped for the next major version of the stryker-api (0.3.0) using the tag `npm i stryker-api@next` |
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,56 @@ | ||
{ | ||
"name": "stryker-plugin-seed", | ||
"version": "0.1.0", | ||
"description": "A seed project for stryker plugins", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "grunt test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/stryker-mutator/stryker-plugin-seed.git" | ||
}, | ||
"keywords": [ | ||
"stryker", | ||
"seed" | ||
], | ||
"author": "nicojs", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/stryker-mutator/stryker-plugin-seed/issues" | ||
}, | ||
"homepage": "https://github.com/stryker-mutator/stryker-plugin-seed#readme", | ||
"peerDependencies": { | ||
"stryker-api": "^0.3.0-rc1" | ||
}, | ||
"devDependencies": { | ||
"@types/chai-as-promised": "0.0.29", | ||
"@types/es6-promise": "0.0.32", | ||
"@types/estree": "0.0.34", | ||
"@types/lodash": "^4.14.37", | ||
"@types/mocha": "^2.2.32", | ||
"@types/node": "^6.0.45", | ||
"@types/sinon": "^1.16.31", | ||
"@types/sinon-chai": "^2.7.27", | ||
"chai": "^3.5.0", | ||
"chai-as-promised": "^6.0.0", | ||
"grunt": "^1.0.1", | ||
"grunt-bump": "^0.8.0", | ||
"grunt-contrib-clean": "^1.0.0", | ||
"grunt-contrib-watch": "^1.0.0", | ||
"grunt-conventional-changelog": "^6.1.0", | ||
"grunt-mocha-istanbul": "^5.0.2", | ||
"grunt-mocha-test": "^0.13.2", | ||
"grunt-npm": "0.0.2", | ||
"grunt-ts": "^6.0.0-beta.3", | ||
"grunt-tslint": "^3.2.1", | ||
"istanbul": "^0.4.5", | ||
"load-grunt-tasks": "^3.5.2", | ||
"mocha": "^3.1.0", | ||
"sinon": "^1.17.6", | ||
"sinon-chai": "^2.8.0", | ||
"stryker-api": "^0.3.0-rc1", | ||
"tslint": "^3.15.1", | ||
"typescript": "^2.0.3" | ||
} | ||
} |
Oops, something went wrong.