aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>2023-01-29 18:58:11 -0500
committerGitHub <noreply@github.com>2023-01-29 18:58:11 -0500
commit7309443a9b138fb1c2aa09f106cec043f8dc42dd (patch)
tree60b43c2a2b8cf7050c83f53afca74b4038e8f89f
parent2da5d57622bea715a3f521eb52488d833ef4538f (diff)
downloadcompiler-explorer-7309443a9b138fb1c2aa09f106cec043f8dc42dd.tar.gz
compiler-explorer-7309443a9b138fb1c2aa09f106cec043f8dc42dd.zip
Setup TS testing infrastructure (#4659)gh-6051
-rw-r--r--package-lock.json13
-rw-r--r--package.json3
-rw-r--r--test/ansi-to-html-tests.ts (renamed from test/ansi-to-html-tests.js)1
3 files changed, 15 insertions, 2 deletions
diff --git a/package-lock.json b/package-lock.json
index f59f6e220..de715bf2f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -93,6 +93,7 @@
"@types/express": "^4.17.14",
"@types/fs-extra": "^9.0.13",
"@types/jquery": "^3.5.10",
+ "@types/mocha": "^8.2.2",
"@types/qs": "^6.9.7",
"@types/shell-quote": "^1.7.1",
"@types/tar-fs": "^2.0.1",
@@ -1895,6 +1896,12 @@
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==",
"dev": true
},
+ "node_modules/@types/mocha": {
+ "version": "8.2.3",
+ "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz",
+ "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==",
+ "dev": true
+ },
"node_modules/@types/node": {
"version": "18.11.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
@@ -17044,6 +17051,12 @@
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==",
"dev": true
},
+ "@types/mocha": {
+ "version": "8.2.3",
+ "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz",
+ "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==",
+ "dev": true
+ },
"@types/node": {
"version": "18.11.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
diff --git a/package.json b/package.json
index b1d14b2f3..21568dcbc 100644
--- a/package.json
+++ b/package.json
@@ -104,6 +104,7 @@
"@types/express": "^4.17.14",
"@types/fs-extra": "^9.0.13",
"@types/jquery": "^3.5.10",
+ "@types/mocha": "^8.2.2",
"@types/qs": "^6.9.7",
"@types/shell-quote": "^1.7.1",
"@types/tar-fs": "^2.0.1",
@@ -172,7 +173,7 @@
"lint": "eslint . --fix",
"lint-check": "eslint .",
"lint-files": "eslint",
- "test": "mocha -b",
+ "test": "mocha -b -r ts-node/register 'test/**/*.ts' 'test/**/*.js'",
"test-min": "mocha -b --config .mocharc-min.yml",
"fix": "npm run lint && npm run format && npm run ts-check",
"check": "npm run ts-check && npm run lint-check && npm run test-min -- --reporter min",
diff --git a/test/ansi-to-html-tests.js b/test/ansi-to-html-tests.ts
index c71881797..93f805908 100644
--- a/test/ansi-to-html-tests.js
+++ b/test/ansi-to-html-tests.ts
@@ -22,7 +22,6 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-// TODO(supergrecko): Re-enable these once TS test infrastructure is up
import {Filter} from '../static/ansi-to-html';
describe('ansi-to-html', () => {