Skip to content

Commit 0ab44f8

Browse files
committed
test: use for of
1 parent ece56d8 commit 0ab44f8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/card.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ const emptyCard = [
4646
];
4747

4848
describe("getCard", () => {
49-
definedCard.forEach((query) => {
49+
for (query of definedCard) {
5050
it(`${JSON.stringify(query)} - should return card`, async () => {
5151
const card = getCard(query, fakeGists);
5252
expect(card).toBeDefined();
5353
});
54-
});
54+
}
5555

56-
emptyCard.forEach((query) => {
56+
for (query of emptyCard) {
5757
it(`${JSON.stringify(query)} - should return empty card`, async () => {
5858
const card = getCard(query, []);
5959
expect(card.gists).toStrictEqual([]);
6060
});
61-
});
61+
}
6262
});

tests/pin.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ const emptyPin = [
4343
];
4444

4545
describe("getPin", () => {
46-
definedPin.forEach((query) => {
46+
for (query of definedPin) {
4747
it(`${JSON.stringify(query)} - should return pin`, async () => {
4848
const pin = await getPin(query, fakeGist);
4949
expect(pin).toBeDefined();
5050
});
51-
});
51+
}
5252

53-
emptyPin.forEach((query) => {
53+
for (query of emptyPin) {
5454
it(`${JSON.stringify(query)} - should return empty pin`, async () => {
5555
const pin = await getPin(query, fakeNULL);
5656
expect(pin.filename).toBeUndefined();
5757
});
58-
});
58+
}
5959
});

0 commit comments

Comments
 (0)