From 11de1cedaadcbb3a38791fe8cfa1a6db0a832713 Mon Sep 17 00:00:00 2001 From: Ella Iseulde Van Dorpe Date: Sun, 7 Jun 2015 22:15:47 +0000 Subject: [PATCH] TinyMCE: wptextpattern: make tests ~2x faster * Reuse the same instance for all tests in the module. * Run without CSS (skin). * Less typing. See #31441. git-svn-id: https://develop.svn.wordpress.org/trunk@32706 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tinymce/plugins/wptextpattern/plugin.js | 56 ++++++++++++------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js b/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js index 4dbf68f968..c700676a07 100644 --- a/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js +++ b/tests/qunit/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js @@ -1,5 +1,6 @@ ( function( $, QUnit, tinymce, _type, setTimeout ) { - var editor; + var editor, + count = 0; if ( tinymce.Env.ie && tinymce.Env.ie < 9 ) { return; @@ -31,35 +32,48 @@ QUnit.module( 'tinymce.plugins.wptextpattern', { beforeEach: function( assert ) { - var done = assert.async(); + var done; - $( '#qunit-fixture' ).append( '