You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ge...@apache.org on 2020/05/28 11:01:21 UTC

[incubator-annotator] 02/03: Rename test files to end with '.test.ts'

This is an automated email from the ASF dual-hosted git repository.

gerben pushed a commit to branch dom-tests
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit 82f0a270da9a10881364c3a9dcb29147f37dd6b0
Author: Gerben <ge...@treora.com>
AuthorDate: Thu May 28 12:03:47 2020 +0200

    Rename test files to end with '.test.ts'
    
    So mocha won’t bother executing 'test/utils.ts' etcetera.
---
 package.json                                                          | 4 ++--
 packages/dom/test/{cartesian.ts => cartesian.test.ts}                 | 0
 .../dom/test/{text-quote-describe.ts => text-quote-describe.test.ts}  | 0
 packages/dom/test/{text-quote-match.ts => text-quote-match.test.ts}   | 0
 test/{data-model.ts => data-model.test.ts}                            | 0
 web/webpack.config.js                                                 | 2 +-
 6 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package.json b/package.json
index 004eb24..5bbf2be 100644
--- a/package.json
+++ b/package.json
@@ -25,9 +25,9 @@
     "prepare": "lerna run prepare",
     "prepublishOnly": "yarn run build",
     "start": "yarn run web:server",
-    "test": "cross-env BABEL_ENV=test nyc mocha packages/*/test/**/*.[jt]s",
+    "test": "cross-env BABEL_ENV=test nyc mocha packages/*/test/**/*.test.[jt]s",
     "typecheck": "tsc && tsc -p tsconfig.tests.json",
-    "validate": "cross-env BABEL_ENV=test mocha test/**/*.[jt]s",
+    "validate": "cross-env BABEL_ENV=test mocha test/**/*.test.[jt]s",
     "web:build": "webpack  --config=web/webpack.config.js --mode development",
     "web:server": "webpack-dev-server --config=web/webpack.config.js --hot --mode development"
   },
diff --git a/packages/dom/test/cartesian.ts b/packages/dom/test/cartesian.test.ts
similarity index 100%
rename from packages/dom/test/cartesian.ts
rename to packages/dom/test/cartesian.test.ts
diff --git a/packages/dom/test/text-quote-describe.ts b/packages/dom/test/text-quote-describe.test.ts
similarity index 100%
rename from packages/dom/test/text-quote-describe.ts
rename to packages/dom/test/text-quote-describe.test.ts
diff --git a/packages/dom/test/text-quote-match.ts b/packages/dom/test/text-quote-match.test.ts
similarity index 100%
rename from packages/dom/test/text-quote-match.ts
rename to packages/dom/test/text-quote-match.test.ts
diff --git a/test/data-model.ts b/test/data-model.test.ts
similarity index 100%
rename from test/data-model.ts
rename to test/data-model.test.ts
diff --git a/web/webpack.config.js b/web/webpack.config.js
index 8da5b59..5dcbfda 100644
--- a/web/webpack.config.js
+++ b/web/webpack.config.js
@@ -30,7 +30,7 @@ module.exports = {
     demo: ['./demo/index.html', './demo/index.js'],
     test: [
       './test/index.html',
-      'mocha-loader!multi-entry-loader?include=./packages/*/test/**/*.[jt]s!',
+      'mocha-loader!multi-entry-loader?include=./packages/*/test/**/*.test.[jt]s!',
     ],
   },
   resolve: {