Skip to content

Commit 16a245d

Browse files
committed
Prefer code that's easier to read
1 parent 5448a96 commit 16a245d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/layouts/romanized/spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe("romanized", () => {
1414
const asciiKeys = [...Array(256).keys()].map((key) =>
1515
String.fromCharCode(key)
1616
);
17-
const filteredKeys = asciiKeys.filter((key) => testKeys.indexOf(key) < 0);
17+
const filteredKeys = asciiKeys.filter((key) => !testKeys.includes(key));
1818

1919
const receivedKeys = filteredKeys.map((key) => romanized.formatKey(key));
2020
const expectedKeys = [...Array(receivedKeys.length)];

test/layouts/traditional/spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe("traditional", () => {
1414
const asciiKeys = [...Array(256).keys()].map((key) =>
1515
String.fromCharCode(key)
1616
);
17-
const filteredKeys = asciiKeys.filter((key) => testKeys.indexOf(key) < 0);
17+
const filteredKeys = asciiKeys.filter((key) => !testKeys.includes(key));
1818

1919
const receivedKeys = filteredKeys.map((key) =>
2020
traditional.formatKey(key)

0 commit comments

Comments
 (0)