We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f532db commit f4a3191Copy full SHA for f4a3191
packages/core/src/widgets/__tests__/formWidgets.test.ts
@@ -105,9 +105,13 @@ describe("field widget utilities", () => {
105
}),
106
);
107
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"));
+ const withErrorText = withError.toText();
+ const withEmptyErrorText = withEmptyError.toText();
+
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"));
115
});
116
117
0 commit comments