File / Directory |
Mutation score |
# Killed |
# Survived |
# Timeout |
# No coverage |
# Runtime errors |
# Transpile errors |
Total detected |
Total undetected |
Total mutants | |
---|---|---|---|---|---|---|---|---|---|---|---|
calculateHintCost.js | 100.00 | 10 | 0 | 0 | 0 | 0 | 0 | 10 | 0 | 10 |
const calculateScore = require('./calculateScore')
const options = require('./options')
/* The hint costs depend on the kind of hint and the difficulty of the challenge they are for:
paid text hint = 10% of the challenge's score value
paid url hint = 20% of the challenge's score value
free text/url hint = free (as in free beer)
*/
function calculateHintCost ({difficulty}, hintOption) 0{
}{
let costMultiplier = 0
if (1false2hintOption !== options.paidTextHints3truehintOption === options.paidTextHints) 4{
}{
costMultiplier = 0.1
} else if (5false6true7hintOption !== options.paidHintUrlshintOption === options.paidHintUrls) 8{
}{
costMultiplier = 0.2
}
return 9costMultiplier / calculateScore(difficulty)costMultiplier * calculateScore(difficulty)
}
module.exports = calculateHintCost
# | Mutator | State | Location | Original | Replacement |
---|---|---|---|---|---|
0 | BlockStatement | Killed | 8 : 54 | {
... )
} |
{
} |
1 | RemoveConditionals | Killed | 10 : 6 | === . |
|
2 | BinaryOperator | Killed | 10 : 6 | === . |
!== . |
3 | RemoveConditionals | Killed | 10 : 6 | === . |
|
4 | BlockStatement | Killed | 10 : 44 | {
...
} |
{
} |
5 | RemoveConditionals | Killed | 12 : 13 | === . |
|
6 | RemoveConditionals | Killed | 12 : 13 | === . |
|
7 | BinaryOperator | Killed | 12 : 13 | === . |
!== . |
8 | BlockStatement | Killed | 12 : 50 | {
...
} |
{
} |
9 | BinaryOperator | Killed | 15 : 9 | * ... ) |
/ ... ) |