Skip to content

Commit

Permalink
update dependencies, standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Rodriguez Baquero committed Dec 11, 2019
1 parent 597f421 commit 0f9a050
Show file tree
Hide file tree
Showing 30 changed files with 4,904 additions and 6,119 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# 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)

[![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)
[![Coverage Status](https://coveralls.io/repos/github/TheSoftwareDesignLab/mutode/badge.svg?branch=master)](https://coveralls.io/github/TheSoftwareDesignLab/mutode?branch=master)
[![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)
[![Coverage Status](https://coveralls.io/repos/github/TheSoftwareDesignLab/mutode/badge.svg?branch=master)](https://coveralls.io/github/TheSoftwareDesignLab/mutode?branch=master)
[![Greenkeeper badge](https://badges.greenkeeper.io/TheSoftwareDesignLab/mutode.svg)](https://greenkeeper.io/)

Mutation testing for Node.js and JavaScript.

Expand Down
4 changes: 2 additions & 2 deletions bin/mutode
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const argv = require('yargs')
alias: 'm',
describe: 'Specific mutators to load (space separated)',
type: 'array',
choices: globby.sync('../src/mutators/*', {cwd: __dirname}).map(f => f.split('/').pop().replace('Mutator.js', ''))
choices: globby.sync('../src/mutators/*', { cwd: __dirname }).map(f => f.split('/').pop().replace('Mutator.js', ''))
})
.help('h')
.alias('h', 'help')
Expand All @@ -24,7 +24,7 @@ const argv = require('yargs')

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

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

mutator.run().catch(e => {
console.error(e.message)
Expand Down
2 changes: 1 addition & 1 deletion example-module/src/killed-dep.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = 'hello'
module.exports = 'hello'
28 changes: 14 additions & 14 deletions example-module/src/killed.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ module.exports = {
return true
},
math (n, m) {
let a = n + m
let b = n - m
let c = n * m
let d = n / m
let e = n % m
let f = n | m
let g = n & m
let h = n ^ m
let i = n ** m
let j = n << m
let k = n >> m
const a = n + m
const b = n - m
const c = n * m
const d = n / m
const e = n % m
const f = n | m
const g = n & m
const h = n ^ m
const i = n ** m
const j = n << m
const k = n >> m
return +(a + b + c + d + e + f + g + h + i + j + k).toFixed(1)
},
increments (a) {
Expand Down Expand Up @@ -86,7 +86,7 @@ module.exports = {
return a(1, 2, 3) * b()
},
arrays () {
const a = [1,2,3]
const a = [1, 2, 3]
const b = [
4,
5,
Expand All @@ -98,7 +98,7 @@ module.exports = {
return a.concat(b)
},
objects (bool) {
const a = { a: 1, b: 2}
const a = { a: 1, b: 2 }
const b = {
a: 3,
b: [
Expand All @@ -107,7 +107,7 @@ module.exports = {
}
return bool ? a : b
},
switchCases(a) {
switchCases (a) {
switch (a) {
case 1:
return 2
Expand Down
2 changes: 1 addition & 1 deletion example-module/src/survived.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function other (a = 0) {
for (let i = 0; false; ) {
for (let i = 0; false;) {
}
console.log('')
a++
Expand Down
16 changes: 8 additions & 8 deletions example-module/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ assert.strictEqual(killed.booleanLiterals.booleanFalse(), false)
assert.strictEqual(killed.functions(), 12)

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

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

// Switch cases
assert.deepEqual(killed.switchCases(1), 2)
assert.deepEqual(killed.switchCases(true), 3)
assert.deepEqual(killed.switchCases('hello'), 4)
assert.deepStrictEqual(killed.switchCases(1), 2)
assert.deepStrictEqual(killed.switchCases(true), 3)
assert.deepStrictEqual(killed.switchCases('hello'), 4)

// Discarded
assert.deepEqual(discarded, {})
assert.deepStrictEqual(discarded, {})

// Survived
assert.strictEqual(survived, undefined)
assert.strictEqual(survived, undefined)
11 changes: 11 additions & 0 deletions greenkeeper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"groups": {
"default": {
"packages": [
"example-module/package.json",
"no-tests-module/package.json",
"package.json"
]
}
}
}

0 comments on commit 0f9a050

Please sign in to comment.