@vtmn/svelte
Advanced tools
Comparing version 3.0.0 to 3.1.0
{ | ||
"name": "@vtmn/svelte", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Decathlon Design System - Vitamin Svelte components library", | ||
@@ -132,3 +132,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "9a1b63f4093ee0e0ab55ace47c68b21f7e663488" | ||
"gitHead": "cf11a56c059889cca5de1cb7c15c71ddfa5a847b" | ||
} |
@@ -49,2 +49,13 @@ import '@testing-library/jest-dom'; | ||
test('Should trigger focus event if focused', () => { | ||
const onFocus = jest.fn(); | ||
const { component, getByPlaceholderText } = render(VtmnTextInput, { | ||
...params, | ||
}); | ||
const inputEl = getByPlaceholderText(params.placeholder); | ||
component.$on('focus', onFocus); | ||
inputEl.focus(); | ||
expect(onFocus).toHaveBeenCalledTimes(1); | ||
}); | ||
test('Should display the label if labelText are defined', () => { | ||
@@ -212,2 +223,14 @@ const { container } = render(VtmnTextInput, { ...params }); | ||
}); | ||
test('Should trigger focus event if focused', () => { | ||
const onFocus = jest.fn(); | ||
const { component, getByPlaceholderText } = render(VtmnTextInput, { | ||
...params, | ||
multiline: true, | ||
}); | ||
const inputEl = getByPlaceholderText(params.placeholder); | ||
component.$on('focus', onFocus); | ||
inputEl.focus(); | ||
expect(onFocus).toHaveBeenCalledTimes(1); | ||
}); | ||
}); | ||
@@ -214,0 +237,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1516499
31893