From f5ced785e0e80c196a31c31a165ba2f99ea50c2c Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Wed, 25 Oct 2017 14:54:28 +0000 Subject: [PATCH] Tests: padded-blocks --- .eslintrc.tests.json | 4 +--- tests/javascript/mochaTestHelper.js | 2 -- tests/javascript/newsletter_editor/blocks/container.spec.js | 2 -- tests/javascript/newsletter_editor/blocks/footer.spec.js | 1 - tests/javascript/newsletter_editor/blocks/social.spec.js | 1 - tests/javascript/newsletter_editor/blocks/text.spec.js | 1 - .../newsletter_editor/components/communication.spec.js | 1 - tests/javascript/newsletter_editor/components/config.spec.js | 1 - tests/javascript/newsletter_editor/components/heading.spec.js | 1 - tests/javascript/newsletter_editor/components/save.spec.js | 2 -- tests/javascript/newsletter_editor/components/sidebar.spec.js | 1 - 11 files changed, 1 insertion(+), 16 deletions(-) diff --git a/.eslintrc.tests.json b/.eslintrc.tests.json index 3128966dc1..b789f665ee 100644 --- a/.eslintrc.tests.json +++ b/.eslintrc.tests.json @@ -11,8 +11,6 @@ // Exceptions "func-names": 0, // Temporary - "no-underscore-dangle": 0, - // To add - "padded-blocks": 0 + "no-underscore-dangle": 0 } } diff --git a/tests/javascript/mochaTestHelper.js b/tests/javascript/mochaTestHelper.js index 55c038a32b..8d3acb0767 100644 --- a/tests/javascript/mochaTestHelper.js +++ b/tests/javascript/mochaTestHelper.js @@ -12,7 +12,6 @@ global.expect = chai.expect; global.sinon = sinon; if (!global.document || !global.window) { - global.document = jsdom('', {}, { FetchExternalResources: ['script'], ProcessExternalResources: ['script'], @@ -22,7 +21,6 @@ if (!global.document || !global.window) { global.window = document.parentWindow; global.navigator = global.window.navigator; - } const testHelpers = require('./loadHelpers.js'); global.testHelpers = testHelpers; diff --git a/tests/javascript/newsletter_editor/blocks/container.spec.js b/tests/javascript/newsletter_editor/blocks/container.spec.js index fac44d65dd..22b7ad8aaf 100644 --- a/tests/javascript/newsletter_editor/blocks/container.spec.js +++ b/tests/javascript/newsletter_editor/blocks/container.spec.js @@ -121,7 +121,6 @@ define([ }); describe('once rendered', function () { - describe('on root level', function () { var model = new (ContainerBlock.ContainerBlockModel)(); var view; @@ -186,7 +185,6 @@ define([ expect(view.$('.mailpoet_duplicate_block')).to.have.length(1); }); }); - }); }); diff --git a/tests/javascript/newsletter_editor/blocks/footer.spec.js b/tests/javascript/newsletter_editor/blocks/footer.spec.js index 025ee3ee64..9067a0cef1 100644 --- a/tests/javascript/newsletter_editor/blocks/footer.spec.js +++ b/tests/javascript/newsletter_editor/blocks/footer.spec.js @@ -113,7 +113,6 @@ define([ expect(innerModel.get('styles.link.fontColor')).to.equal('#345678'); expect(innerModel.get('styles.link.textDecoration')).to.equal('underline'); }); - }); describe('block view', function () { diff --git a/tests/javascript/newsletter_editor/blocks/social.spec.js b/tests/javascript/newsletter_editor/blocks/social.spec.js index 9fc418341d..abff122c3b 100644 --- a/tests/javascript/newsletter_editor/blocks/social.spec.js +++ b/tests/javascript/newsletter_editor/blocks/social.spec.js @@ -6,7 +6,6 @@ define([ 'newsletter_editor/blocks/social', 'backbone' ], function (EditorApplication, SocialBlock, Backbone) { - describe('Social', function () { describe('block model', function () { var model; diff --git a/tests/javascript/newsletter_editor/blocks/text.spec.js b/tests/javascript/newsletter_editor/blocks/text.spec.js index a115e4d1fc..164eddb7b3 100644 --- a/tests/javascript/newsletter_editor/blocks/text.spec.js +++ b/tests/javascript/newsletter_editor/blocks/text.spec.js @@ -4,7 +4,6 @@ define([ 'newsletter_editor/App', 'newsletter_editor/blocks/text' ], function (EditorApplication, TextBlock) { - describe('Text', function () { describe('model', function () { var model; diff --git a/tests/javascript/newsletter_editor/components/communication.spec.js b/tests/javascript/newsletter_editor/components/communication.spec.js index b70aadb643..1be1e77b13 100644 --- a/tests/javascript/newsletter_editor/components/communication.spec.js +++ b/tests/javascript/newsletter_editor/components/communication.spec.js @@ -7,7 +7,6 @@ define([ 'newsletter_editor/components/communication', 'amd-inject-loader!newsletter_editor/components/communication' ], function (EditorApplication, Communication, CommunicationInjector) { - describe('getPostTypes', function () { it('fetches post types from the server', function () { var module = CommunicationInjector({ diff --git a/tests/javascript/newsletter_editor/components/config.spec.js b/tests/javascript/newsletter_editor/components/config.spec.js index ae82d98861..8df1ee2584 100644 --- a/tests/javascript/newsletter_editor/components/config.spec.js +++ b/tests/javascript/newsletter_editor/components/config.spec.js @@ -4,7 +4,6 @@ define([ 'newsletter_editor/App', 'newsletter_editor/components/config' ], function (EditorApplication, ConfigComponent) { - describe('Config', function () { it('loads and stores configuration', function () { var model; diff --git a/tests/javascript/newsletter_editor/components/heading.spec.js b/tests/javascript/newsletter_editor/components/heading.spec.js index 4946d3551a..86f159ef5c 100644 --- a/tests/javascript/newsletter_editor/components/heading.spec.js +++ b/tests/javascript/newsletter_editor/components/heading.spec.js @@ -5,7 +5,6 @@ define([ 'newsletter_editor/App', 'newsletter_editor/components/heading' ], function (EditorApplication, HeadingComponent) { - describe('Heading', function () { describe('view', function () { var view; diff --git a/tests/javascript/newsletter_editor/components/save.spec.js b/tests/javascript/newsletter_editor/components/save.spec.js index 4fdefbac56..aa42039ea5 100644 --- a/tests/javascript/newsletter_editor/components/save.spec.js +++ b/tests/javascript/newsletter_editor/components/save.spec.js @@ -97,7 +97,6 @@ define([ mock.verify(); }); - }); describe('view', function () { @@ -194,7 +193,6 @@ define([ expect(spy).to.have.callCount(1); expect(spy).to.have.been.calledWith('beforeEditorSave'); }); - }); }); }); diff --git a/tests/javascript/newsletter_editor/components/sidebar.spec.js b/tests/javascript/newsletter_editor/components/sidebar.spec.js index 13d40c5063..b6439c3870 100644 --- a/tests/javascript/newsletter_editor/components/sidebar.spec.js +++ b/tests/javascript/newsletter_editor/components/sidebar.spec.js @@ -5,7 +5,6 @@ define([ 'newsletter_editor/App', 'newsletter_editor/components/sidebar' ], function (EditorApplication, SidebarComponent) { - describe('Sidebar', function () { describe('content view', function () { var view;