Commit 83f02f86 authored by Lee Tickett's avatar Lee Tickett Committed by Phil Hughes

Remove var from bootstrap jquery spec js

parent e61ce041
---
title: Remove var from bootstrap_jquery_spec.js
merge_request: 20089
author: Lee Tickett
type: other
/* eslint-disable no-var */
import $ from 'jquery'; import $ from 'jquery';
import '~/commons/bootstrap'; import '~/commons/bootstrap';
...@@ -10,15 +8,13 @@ describe('Bootstrap jQuery extensions', function() { ...@@ -10,15 +8,13 @@ describe('Bootstrap jQuery extensions', function() {
}); });
it('adds the disabled attribute', function() { it('adds the disabled attribute', function() {
var $input; const $input = $('input').first();
$input = $('input').first();
$input.disable(); $input.disable();
expect($input).toHaveAttr('disabled', 'disabled'); expect($input).toHaveAttr('disabled', 'disabled');
}); });
return it('adds the disabled class', function() { return it('adds the disabled class', function() {
var $input; const $input = $('input').first();
$input = $('input').first();
$input.disable(); $input.disable();
expect($input).toHaveClass('disabled'); expect($input).toHaveClass('disabled');
...@@ -30,15 +26,13 @@ describe('Bootstrap jQuery extensions', function() { ...@@ -30,15 +26,13 @@ describe('Bootstrap jQuery extensions', function() {
}); });
it('removes the disabled attribute', function() { it('removes the disabled attribute', function() {
var $input; const $input = $('input').first();
$input = $('input').first();
$input.enable(); $input.enable();
expect($input).not.toHaveAttr('disabled'); expect($input).not.toHaveAttr('disabled');
}); });
return it('removes the disabled class', function() { return it('removes the disabled class', function() {
var $input; const $input = $('input').first();
$input = $('input').first();
$input.enable(); $input.enable();
expect($input).not.toHaveClass('disabled'); expect($input).not.toHaveClass('disabled');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment