diff --git a/index.js b/index.js index 6b61bf7..a8765e1 100755 --- a/index.js +++ b/index.js @@ -50,6 +50,7 @@ module.exports = (str, begin, end) => { if (escapeCode !== null) { output += wrapAnsi(ansiStyles.codes.get(parseInt(escapeCode, 10)) || END_CODE); } + break; } } diff --git a/package.json b/package.json index 93bafbd..332900c 100644 --- a/package.json +++ b/package.json @@ -42,10 +42,10 @@ "is-fullwidth-code-point": "^2.0.0" }, "devDependencies": { - "ava": "^0.25.0", - "chalk": "^2.0.1", + "ava": "^1.1.0", + "chalk": "^2.4.2", "random-item": "^1.0.0", "strip-ansi": "^5.0.0", - "xo": "^0.23.0" + "xo": "^0.24.0" } } diff --git a/test.js b/test.js index 5e5bc7e..5ada704 100755 --- a/test.js +++ b/test.js @@ -14,7 +14,7 @@ function gen(str) { return `${str}:${chalk[rand2](rand1)} `; } -test(t => { +test('main', t => { // The slice should behave exactly as a regular JS slice behaves for (let i = 0; i < 20; i++) { for (let j = 19; j > i; j--) {