push
github
929 of 1106 branches covered (84.0%)
Branch coverage included in aggregate %.
78 of 113 new or added lines in 4 files covered. (69.03%)
15 existing lines in 5 files now uncovered.9983 of 11720 relevant lines covered (85.18%)
90.7 hits per line
| 1 |
/**
|
|
| 2 |
* @param {import('../Uwave.js').default} uw
|
1✔ |
| 3 |
*/ |
1✔ |
|
UNCOV
4
|
function getCurrentDJ(uw) { |
× |
|
UNCOV
5
|
return uw.redis.get('booth:currentDJ'); |
× |
|
UNCOV
6
|
} |
× |
| 7 |
|
1✔ |
| 8 |
/**
|
1✔ |
| 9 |
* @param {import('../Uwave.js').default} uw
|
1✔ |
| 10 |
* @param {import('../schema.js').UserID} userID
|
1✔ |
| 11 |
*/ |
1✔ |
|
UNCOV
12
|
async function skipIfCurrentDJ(uw, userID) { |
× |
|
UNCOV
13
|
const currentDJ = await getCurrentDJ(uw); |
× |
| 14 |
if (userID.toString() === currentDJ) {
|
× |
| 15 |
await uw.booth.advance({ remove: true });
|
× |
| 16 |
} |
× |
|
UNCOV
17
|
} |
× |
| 18 |
|
1✔ |
| 19 |
export default skipIfCurrentDJ; |
1✔ |