Skip to content

Commit f4a3191

Browse files
committed
test(field): address review feedback
1 parent 5f532db commit f4a3191

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/core/src/widgets/__tests__/formWidgets.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,13 @@ describe("field widget utilities", () => {
105105
}),
106106
);
107107

108-
assert.ok(withError.toText().includes("Required"));
109-
assert.ok(!withError.toText().includes("Enter your name"));
110-
assert.ok(withEmptyError.toText().includes("Enter your name"));
108+
const withErrorText = withError.toText();
109+
const withEmptyErrorText = withEmptyError.toText();
110+
111+
assert.ok(withErrorText.includes("Required"));
112+
assert.ok(!withErrorText.includes("Enter your name"));
113+
assert.ok(withEmptyErrorText.includes("Enter your name"));
114+
assert.ok(!withEmptyErrorText.includes("Required"));
111115
});
112116
});
113117

0 commit comments

Comments
 (0)