From 17ea99fb807fd027fd6f0dcd3e0abb09c4c6fa79 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Fri, 27 Oct 2017 15:49:19 +0200 Subject: [PATCH] Testing: Move config file for unit tests to its own subfolder --- package.json | 13 ++++++------- test/{ => unit}/pegjs-transform.js | 0 test/{ => unit}/setup-globals.js | 0 test/{ => unit}/setup-test-framework.js | 0 test/{ => unit}/setup-wp-aliases.js | 0 test/{ => unit}/style-mock.js | 0 6 files changed, 6 insertions(+), 7 deletions(-) rename test/{ => unit}/pegjs-transform.js (100%) rename test/{ => unit}/setup-globals.js (100%) rename test/{ => unit}/setup-test-framework.js (100%) rename test/{ => unit}/setup-wp-aliases.js (100%) rename test/{ => unit}/style-mock.js (100%) diff --git a/package.json b/package.json index 81c4c1428d1b34..2abdba936c5364 100644 --- a/package.json +++ b/package.json @@ -94,29 +94,28 @@ "(blocks|components|date|editor|element|i18n|utils)/**/*.js" ], "coveragePathIgnorePatterns": [ - "/[^/]+/build/index.js", - ".*/story/[^/]+.js" + "/[^/]+/build/index.js" ], "coverageDirectory": "coverage", "moduleNameMapper": { - "\\.(scss|css)$": "/test/style-mock.js", + "\\.(scss|css)$": "/test/unit/style-mock.js", "@wordpress\\/(blocks|components|date|editor|element|i18n|utils)": "$1" }, "modulePaths": [ "" ], "setupFiles": [ - "/test/setup-globals.js", - "/test/setup-wp-aliases.js" + "/test/unit/setup-globals.js", + "/test/unit/setup-wp-aliases.js" ], - "setupTestFrameworkScriptFile": "/test/setup-test-framework.js", + "setupTestFrameworkScriptFile": "/test/unit/setup-test-framework.js", "testMatch": [ "/(blocks|components|date|editor|element|i18n|utils)/**/test/*.js" ], "timers": "fake", "transform": { "^.+\\.jsx?$": "babel-jest", - "\\.pegjs$": "/test/pegjs-transform.js" + "\\.pegjs$": "/test/unit/pegjs-transform.js" }, "verbose": true }, diff --git a/test/pegjs-transform.js b/test/unit/pegjs-transform.js similarity index 100% rename from test/pegjs-transform.js rename to test/unit/pegjs-transform.js diff --git a/test/setup-globals.js b/test/unit/setup-globals.js similarity index 100% rename from test/setup-globals.js rename to test/unit/setup-globals.js diff --git a/test/setup-test-framework.js b/test/unit/setup-test-framework.js similarity index 100% rename from test/setup-test-framework.js rename to test/unit/setup-test-framework.js diff --git a/test/setup-wp-aliases.js b/test/unit/setup-wp-aliases.js similarity index 100% rename from test/setup-wp-aliases.js rename to test/unit/setup-wp-aliases.js diff --git a/test/style-mock.js b/test/unit/style-mock.js similarity index 100% rename from test/style-mock.js rename to test/unit/style-mock.js