Use the ES6 linting rules from the website (#138)

This commit is contained in:
Rowan Manning
2016-07-22 14:34:10 +01:00
committed by GitHub
parent df8f5a7d07
commit e431fefbd8
33 changed files with 246 additions and 237 deletions

View File

@@ -13,14 +13,15 @@
// You should have received a copy of the GNU General Public License
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
// jscs:disable maximumLineLength, requireArrowFunctions
'use strict';
var assert = require('proclaim');
const assert = require('proclaim');
describe('GET /<task-id>/delete', function() {
beforeEach(function(done) {
var req = {
const req = {
method: 'GET',
endpoint: '/abc000000000000000000001/delete'
};
@@ -32,7 +33,7 @@ describe('GET /<task-id>/delete', function() {
});
it('should have a "Delete URL" form', function() {
var form = this.last.dom('[data-test=delete-url-form]').eq(0);
const form = this.last.dom('[data-test=delete-url-form]').eq(0);
assert.isDefined(form);
assert.strictEqual(form.attr('action'), '/abc000000000000000000001/delete');
assert.strictEqual(form.attr('method'), 'post');
@@ -47,7 +48,7 @@ describe('GET /<task-id>/delete', function() {
describe('POST /<task-id>/delete', function() {
beforeEach(function(done) {
var req = {
const req = {
method: 'POST',
endpoint: '/abc000000000000000000001/delete'
};
@@ -70,7 +71,7 @@ describe('POST /<task-id>/delete', function() {
});
it('should display a success message', function() {
var alert = this.last.dom('[data-test=alert]').eq(0);
const alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.text(), /been deleted/i);
});