From 45e79205f1f84e0ad79d1c343cc73a6a5e2bd0b3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 3 Oct 2021 08:32:01 -0700 Subject: [PATCH] Clean up code organizing tests structure --- .../test/playground/{lib => }/BalancedTestSuite.js | 2 +- .../test/playground/{lib => }/FreeTestSuite.js | 2 +- .../test/playground/{lib => }/SymmetricTestSuite.js | 2 +- .../mindplot/test/playground/{lib => }/TestSuite.js | 2 +- packages/mindplot/test/playground/context-loader.js | 11 ++++------- .../test/{javascript => unit}/BalancedTestSuite.js | 0 .../test/{javascript => unit}/DesignerTestSuite.js | 0 .../test/{javascript => unit}/EventsTestSuite.js | 0 .../test/{javascript => unit}/FreeTestSuite.js | 0 .../test/{javascript => unit}/SymmetricTestSuite.js | 0 .../mindplot/test/{javascript => unit}/TestSuite.js | 0 .../test/{javascript => unit}/lib/jquery-1.8.2.js | 0 .../mindplot/test/{javascript => unit}/simpleTest.js | 0 13 files changed, 8 insertions(+), 11 deletions(-) rename packages/mindplot/test/playground/{lib => }/BalancedTestSuite.js (99%) rename packages/mindplot/test/playground/{lib => }/FreeTestSuite.js (99%) rename packages/mindplot/test/playground/{lib => }/SymmetricTestSuite.js (99%) rename packages/mindplot/test/playground/{lib => }/TestSuite.js (99%) rename packages/mindplot/test/{javascript => unit}/BalancedTestSuite.js (100%) rename packages/mindplot/test/{javascript => unit}/DesignerTestSuite.js (100%) rename packages/mindplot/test/{javascript => unit}/EventsTestSuite.js (100%) rename packages/mindplot/test/{javascript => unit}/FreeTestSuite.js (100%) rename packages/mindplot/test/{javascript => unit}/SymmetricTestSuite.js (100%) rename packages/mindplot/test/{javascript => unit}/TestSuite.js (100%) rename packages/mindplot/test/{javascript => unit}/lib/jquery-1.8.2.js (100%) rename packages/mindplot/test/{javascript => unit}/simpleTest.js (100%) diff --git a/packages/mindplot/test/playground/lib/BalancedTestSuite.js b/packages/mindplot/test/playground/BalancedTestSuite.js similarity index 99% rename from packages/mindplot/test/playground/lib/BalancedTestSuite.js rename to packages/mindplot/test/playground/BalancedTestSuite.js index fa3d8ac9..6ee10063 100644 --- a/packages/mindplot/test/playground/lib/BalancedTestSuite.js +++ b/packages/mindplot/test/playground/BalancedTestSuite.js @@ -17,7 +17,7 @@ */ const TestSuite = require('./TestSuite').default; -const Mindplot = require('../../../lib/mindplot'); +const Mindplot = require('../../lib/mindplot'); const mindplot = Mindplot(); const BalancedTestSuite = new Class({ diff --git a/packages/mindplot/test/playground/lib/FreeTestSuite.js b/packages/mindplot/test/playground/FreeTestSuite.js similarity index 99% rename from packages/mindplot/test/playground/lib/FreeTestSuite.js rename to packages/mindplot/test/playground/FreeTestSuite.js index 983b58d0..25ba6484 100644 --- a/packages/mindplot/test/playground/lib/FreeTestSuite.js +++ b/packages/mindplot/test/playground/FreeTestSuite.js @@ -16,7 +16,7 @@ * limitations under the License. */ const TestSuite = require('./TestSuite').default; -const Mindplot = require('../../../lib/mindplot'); +const Mindplot = require('../../lib/mindplot'); const mindplot = Mindplot(); const FreeTestSuite = new Class({ diff --git a/packages/mindplot/test/playground/lib/SymmetricTestSuite.js b/packages/mindplot/test/playground/SymmetricTestSuite.js similarity index 99% rename from packages/mindplot/test/playground/lib/SymmetricTestSuite.js rename to packages/mindplot/test/playground/SymmetricTestSuite.js index b47bc693..a505ce6b 100644 --- a/packages/mindplot/test/playground/lib/SymmetricTestSuite.js +++ b/packages/mindplot/test/playground/SymmetricTestSuite.js @@ -16,7 +16,7 @@ * limitations under the License. */ const TestSuite = require('./TestSuite').default; -const Mindplot = require('../../../lib/mindplot'); +const Mindplot = require('../../lib/mindplot'); const mindplot = Mindplot(); const SymmetricTestSuite = new Class({ diff --git a/packages/mindplot/test/playground/lib/TestSuite.js b/packages/mindplot/test/playground/TestSuite.js similarity index 99% rename from packages/mindplot/test/playground/lib/TestSuite.js rename to packages/mindplot/test/playground/TestSuite.js index 0732a966..963af45b 100644 --- a/packages/mindplot/test/playground/lib/TestSuite.js +++ b/packages/mindplot/test/playground/TestSuite.js @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const Mindplot = require('../../../lib/mindplot'); +const Mindplot = require('../../lib/mindplot'); const mindplot = Mindplot(); const TestSuite = new Class({ diff --git a/packages/mindplot/test/playground/context-loader.js b/packages/mindplot/test/playground/context-loader.js index cfb638cc..dadf1a1c 100644 --- a/packages/mindplot/test/playground/context-loader.js +++ b/packages/mindplot/test/playground/context-loader.js @@ -1,10 +1,7 @@ -const Mindplot = require('../../lib/mindplot'); -global.mindplot = Mindplot(); - -const TestSuite = require('./lib/TestSuite').default; -const BalancedTestSuite = require('./lib/BalancedTestSuite').default; -const SymmetricTestSuite = require('./lib/SymmetricTestSuite').default; -const FreeTestSuite = require('./lib/FreeTestSuite').default; +const TestSuite = require('./TestSuite').default; +const BalancedTestSuite = require('./BalancedTestSuite').default; +const SymmetricTestSuite = require('./SymmetricTestSuite').default; +const FreeTestSuite = require('./FreeTestSuite').default; window.addEventListener('DOMContentLoaded', function () { var basicTest = new TestSuite(); diff --git a/packages/mindplot/test/javascript/BalancedTestSuite.js b/packages/mindplot/test/unit/BalancedTestSuite.js similarity index 100% rename from packages/mindplot/test/javascript/BalancedTestSuite.js rename to packages/mindplot/test/unit/BalancedTestSuite.js diff --git a/packages/mindplot/test/javascript/DesignerTestSuite.js b/packages/mindplot/test/unit/DesignerTestSuite.js similarity index 100% rename from packages/mindplot/test/javascript/DesignerTestSuite.js rename to packages/mindplot/test/unit/DesignerTestSuite.js diff --git a/packages/mindplot/test/javascript/EventsTestSuite.js b/packages/mindplot/test/unit/EventsTestSuite.js similarity index 100% rename from packages/mindplot/test/javascript/EventsTestSuite.js rename to packages/mindplot/test/unit/EventsTestSuite.js diff --git a/packages/mindplot/test/javascript/FreeTestSuite.js b/packages/mindplot/test/unit/FreeTestSuite.js similarity index 100% rename from packages/mindplot/test/javascript/FreeTestSuite.js rename to packages/mindplot/test/unit/FreeTestSuite.js diff --git a/packages/mindplot/test/javascript/SymmetricTestSuite.js b/packages/mindplot/test/unit/SymmetricTestSuite.js similarity index 100% rename from packages/mindplot/test/javascript/SymmetricTestSuite.js rename to packages/mindplot/test/unit/SymmetricTestSuite.js diff --git a/packages/mindplot/test/javascript/TestSuite.js b/packages/mindplot/test/unit/TestSuite.js similarity index 100% rename from packages/mindplot/test/javascript/TestSuite.js rename to packages/mindplot/test/unit/TestSuite.js diff --git a/packages/mindplot/test/javascript/lib/jquery-1.8.2.js b/packages/mindplot/test/unit/lib/jquery-1.8.2.js similarity index 100% rename from packages/mindplot/test/javascript/lib/jquery-1.8.2.js rename to packages/mindplot/test/unit/lib/jquery-1.8.2.js diff --git a/packages/mindplot/test/javascript/simpleTest.js b/packages/mindplot/test/unit/simpleTest.js similarity index 100% rename from packages/mindplot/test/javascript/simpleTest.js rename to packages/mindplot/test/unit/simpleTest.js