diff options
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/testUtils.js')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/testUtils.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/helpers/testUtils.js b/server/sonar-web/src/main/js/helpers/testUtils.js index 358df804d4f..b426403453f 100644 --- a/server/sonar-web/src/main/js/helpers/testUtils.js +++ b/server/sonar-web/src/main/js/helpers/testUtils.js @@ -17,13 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +export const mockEvent = { + target: { blur() {} }, + currentTarget: { blur() {} }, + preventDefault() {}, + stopPropagation() {} +}; + export const click = element => { - return element.simulate('click', { - target: { blur() {} }, - currentTarget: { blur() {} }, - preventDefault() {}, - stopPropagation() {} - }); + return element.simulate('click', mockEvent); }; export const submit = element => { |