We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fcea55 commit 2ccb564Copy full SHA for 2ccb564
src/components/TextInput/TextInput.spec.ts
@@ -264,6 +264,21 @@ describe('TextInput', () => {
264
});
265
266
267
+ it('renders a required input', () => {
268
+ // Arrange
269
+ const wrapper = shallowMount(JTextInput, {
270
+ props: {
271
+ id: 'test-id',
272
+ },
273
+ attrs: {
274
+ required: 'true'
275
+ }
276
+ });
277
+
278
+ // Assert
279
+ expect(wrapper.find('label').text()).toContain('* (required)');
280
281
282
it('renders an error message', () => {
283
// Arrange
284
const wrapper = shallowMount(JTextInput, {
0 commit comments