fix a eslint error

This commit is contained in:
JuFeng Zhang 2020-06-29 19:53:01 +08:00
parent 23314bb577
commit dc51c22f38
2 changed files with 4 additions and 2 deletions

View File

@ -34,7 +34,7 @@
"watch": "node scripts/watch.js",
"prepare": "yarn build:development",
"prepublishOnly": "yarn build:production",
"lint": "eslint ./src --max-warnings 0",
"lint": "eslint ./src ./scripts --max-warnings 0",
"esdoc": "esdoc -c esdoc.json",
"test": "jest --config config.json",
"test-ci": "jest --config config.json --coverage && codecov",

View File

@ -2,7 +2,9 @@ function toHaveTriggeredSensorEvent(received, expectedEventName, count) {
let triggered = false;
let callCount = 0;
function callback() {
count !== undefined && (callCount = callCount + 1);
if (count !== undefined) {
callCount++;
}
triggered = true;
}