File / Directory |
Mutation score |
# Killed |
# Survived |
# Timeout |
# No coverage |
# Runtime errors |
# Transpile errors |
Total detected |
Total undetected |
Total mutants | |
---|---|---|---|---|---|---|---|---|---|---|---|
fetchSecretKey.js | 100.00 | 10 | 0 | 0 | 0 | 0 | 0 | 10 | 0 | 10 |
const Promise = require('bluebird')
const request = require('request-promise')
const isUrl = require('./url')
function fetchSecretKey (origin) 0{
}{
return new Promise((resolve, reject) => 1{
}{
if (2false3true4origin || isUrl(origin)origin && isUrl(origin)) 5{
}{
request(origin)
.then(body => 6{
}{
resolve(body)
}).catch(({message}) => 7{
}{
reject(new Error(8'Failed to fetch secret key from URL! ' - message'Failed to fetch secret key from URL! ' + message))
})
} else 9{
}{
resolve(origin)
}
})
}
module.exports = fetchSecretKey
# | Mutator | State | Location | Original | Replacement |
---|---|---|---|---|---|
0 | BlockStatement | Killed | 4 : 33 | {
...})
} |
{
} |
1 | BlockStatement | Killed | 5 : 42 | {
...
} |
{
} |
2 | RemoveConditionals | Killed | 6 : 8 | && ... ) |
|
3 | RemoveConditionals | Killed | 6 : 8 | && ... ) |
|
4 | LogicalOperator | Killed | 6 : 8 | && ... ) |
|| ... ) |
5 | BlockStatement | Killed | 6 : 33 | {
... } |
{
} |
6 | BlockStatement | Killed | 8 : 22 | {
... } |
{
} |
7 | BlockStatement | Killed | 10 : 32 | {
... } |
{
} |
8 | BinaryOperator | Killed | 11 : 27 | ' ...! ' + |
' ...! ' - |
9 | BlockStatement | Killed | 13 : 11 | {
... } |
{
} |