Skip to content

Commit 0f9a050

Browse files
author
Diego Rodriguez Baquero
committed
update dependencies, standard
1 parent 597f421 commit 0f9a050

30 files changed

+4904
-6119
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Mutode [![npm](https://img.shields.io/npm/v/mutode.svg)](http://npmjs.com/package/mutode) [![npm](https://img.shields.io/npm/dm/mutode.svg)](http://npmjs.com/package/mutode) [![npm](https://img.shields.io/npm/l/mutode.svg)](LICENSE)
22

3-
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Build Status](https://travis-ci.org/TheSoftwareDesignLab/mutode.svg?branch=master)](https://travis-ci.org/TheSoftwareDesignLab/mutode) [![Build status](https://ci.appveyor.com/api/projects/status/ulp8cq3aq2bng6he/branch/master?svg=true)](https://ci.appveyor.com/project/DiegoRBaquero/mutode/branch/master)
4-
[![Coverage Status](https://coveralls.io/repos/github/TheSoftwareDesignLab/mutode/badge.svg?branch=master)](https://coveralls.io/github/TheSoftwareDesignLab/mutode?branch=master)
3+
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4+
[![Build Status](https://travis-ci.org/TheSoftwareDesignLab/mutode.svg?branch=master)](https://travis-ci.org/TheSoftwareDesignLab/mutode)
5+
[![Build status](https://ci.appveyor.com/api/projects/status/ulp8cq3aq2bng6he/branch/master?svg=true)](https://ci.appveyor.com/project/DiegoRBaquero/mutode/branch/master)
6+
[![Coverage Status](https://coveralls.io/repos/github/TheSoftwareDesignLab/mutode/badge.svg?branch=master)](https://coveralls.io/github/TheSoftwareDesignLab/mutode?branch=master)
7+
[![Greenkeeper badge](https://badges.greenkeeper.io/TheSoftwareDesignLab/mutode.svg)](https://greenkeeper.io/)
58

69
Mutation testing for Node.js and JavaScript.
710

bin/mutode

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const argv = require('yargs')
1515
alias: 'm',
1616
describe: 'Specific mutators to load (space separated)',
1717
type: 'array',
18-
choices: globby.sync('../src/mutators/*', {cwd: __dirname}).map(f => f.split('/').pop().replace('Mutator.js', ''))
18+
choices: globby.sync('../src/mutators/*', { cwd: __dirname }).map(f => f.split('/').pop().replace('Mutator.js', ''))
1919
})
2020
.help('h')
2121
.alias('h', 'help')
@@ -24,7 +24,7 @@ const argv = require('yargs')
2424

2525
const Mutode = require('../src/mutode')
2626

27-
const mutator = new Mutode({paths: argv._, concurrency: argv.concurrency, mutators: argv.mutators})
27+
const mutator = new Mutode({ paths: argv._, concurrency: argv.concurrency, mutators: argv.mutators })
2828

2929
mutator.run().catch(e => {
3030
console.error(e.message)

example-module/src/killed-dep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = 'hello'
1+
module.exports = 'hello'

example-module/src/killed.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ module.exports = {
55
return true
66
},
77
math (n, m) {
8-
let a = n + m
9-
let b = n - m
10-
let c = n * m
11-
let d = n / m
12-
let e = n % m
13-
let f = n | m
14-
let g = n & m
15-
let h = n ^ m
16-
let i = n ** m
17-
let j = n << m
18-
let k = n >> m
8+
const a = n + m
9+
const b = n - m
10+
const c = n * m
11+
const d = n / m
12+
const e = n % m
13+
const f = n | m
14+
const g = n & m
15+
const h = n ^ m
16+
const i = n ** m
17+
const j = n << m
18+
const k = n >> m
1919
return +(a + b + c + d + e + f + g + h + i + j + k).toFixed(1)
2020
},
2121
increments (a) {
@@ -86,7 +86,7 @@ module.exports = {
8686
return a(1, 2, 3) * b()
8787
},
8888
arrays () {
89-
const a = [1,2,3]
89+
const a = [1, 2, 3]
9090
const b = [
9191
4,
9292
5,
@@ -98,7 +98,7 @@ module.exports = {
9898
return a.concat(b)
9999
},
100100
objects (bool) {
101-
const a = { a: 1, b: 2}
101+
const a = { a: 1, b: 2 }
102102
const b = {
103103
a: 3,
104104
b: [
@@ -107,7 +107,7 @@ module.exports = {
107107
}
108108
return bool ? a : b
109109
},
110-
switchCases(a) {
110+
switchCases (a) {
111111
switch (a) {
112112
case 1:
113113
return 2

example-module/src/survived.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function other (a = 0) {
2-
for (let i = 0; false; ) {
2+
for (let i = 0; false;) {
33
}
44
console.log('')
55
a++

example-module/test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ assert.strictEqual(killed.booleanLiterals.booleanFalse(), false)
5151
assert.strictEqual(killed.functions(), 12)
5252

5353
// Arrays
54-
assert.deepEqual(killed.arrays(), [1, 2, 3, 4, 5, {a: 6, b: 7}])
54+
assert.deepStrictEqual(killed.arrays(), [1, 2, 3, 4, 5, { a: 6, b: 7 }])
5555

5656
// Objects
57-
assert.deepEqual(killed.objects(true), {a: 1, b: 2})
58-
assert.deepEqual(killed.objects(false), {a: 3, b: [4, 5]})
57+
assert.deepStrictEqual(killed.objects(true), { a: 1, b: 2 })
58+
assert.deepStrictEqual(killed.objects(false), { a: 3, b: [4, 5] })
5959

6060
// Switch cases
61-
assert.deepEqual(killed.switchCases(1), 2)
62-
assert.deepEqual(killed.switchCases(true), 3)
63-
assert.deepEqual(killed.switchCases('hello'), 4)
61+
assert.deepStrictEqual(killed.switchCases(1), 2)
62+
assert.deepStrictEqual(killed.switchCases(true), 3)
63+
assert.deepStrictEqual(killed.switchCases('hello'), 4)
6464

6565
// Discarded
66-
assert.deepEqual(discarded, {})
66+
assert.deepStrictEqual(discarded, {})
6767

6868
// Survived
69-
assert.strictEqual(survived, undefined)
69+
assert.strictEqual(survived, undefined)

greenkeeper.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"groups": {
3+
"default": {
4+
"packages": [
5+
"example-module/package.json",
6+
"no-tests-module/package.json",
7+
"package.json"
8+
]
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)