Skip to content

Commit

Permalink
chore: fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Oct 30, 2024
1 parent 523b401 commit 13cc11a
Showing 1 changed file with 22 additions and 29 deletions.
51 changes: 22 additions & 29 deletions src/test/e2e-emulated/map.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2083,36 +2083,29 @@ describe("MapTestContract", () => {
);

// Check that all return values are equal to the old values
mapConfigs.forEach(
({ mapName, key, value, keyTransform, valueTransform }) => {
let mapKey = keys[key];
if (keyTransform) {
mapKey = keyTransform(mapKey);
}

let expectedValue = values[value];
let actualValue = replaceGetResultAfterSet[mapName];
if (valueTransform) {
expectedValue = valueTransform(expectedValue);
actualValue = valueTransform(actualValue);
}
mapConfigs.forEach(({ mapName, value, valueTransform }) => {
let expectedValue = values[value];
let actualValue = replaceGetResultAfterSet[mapName];
if (valueTransform) {
expectedValue = valueTransform(expectedValue);
actualValue = valueTransform(actualValue);
}

if (expectedValue instanceof Cell) {
expect(actualValue).toEqualCell(expectedValue);
} else if (expectedValue instanceof Address) {
expect(actualValue).toEqualAddress(expectedValue);
} else if (isSomeStruct(expectedValue)) {
expect(
compareStructs(
actualValue as SomeStruct,
expectedValue,
),
).toBe(true);
} else {
expect(actualValue).toEqual(expectedValue);
}
},
);
if (expectedValue instanceof Cell) {
expect(actualValue).toEqualCell(expectedValue);
} else if (expectedValue instanceof Address) {
expect(actualValue).toEqualAddress(expectedValue);
} else if (isSomeStruct(expectedValue)) {
expect(
compareStructs(
actualValue as SomeStruct,
expectedValue,
),
).toBe(true);
} else {
expect(actualValue).toEqual(expectedValue);
}
});
}
});

Expand Down

0 comments on commit 13cc11a

Please sign in to comment.