From a284e8c5ebf0e76f56e0c26cb90d22b6df090a54 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 23 Mar 2021 17:54:43 +0900 Subject: [PATCH] fix test --- .mocharc.json | 2 +- package.json | 7 ++++--- test/tsconfig.json | 4 ++++ yarn.lock | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.mocharc.json b/.mocharc.json index 867402688..fc7fee215 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,6 +1,6 @@ { "extension": ["ts","js","cjs","mjs"], - "require": "ts-node/register", + "require": ["ts-node/register", "tsconfig-paths/register"], "slow": 1000, "timeout": 30000, "exit": true diff --git a/package.json b/package.json index 0e9e5191e..7f2689d89 100644 --- a/package.json +++ b/package.json @@ -66,9 +66,6 @@ "@types/jsonld": "1.5.5", "@types/katex": "0.11.0", "@types/koa": "2.13.1", - "@types/koa__cors": "3.0.2", - "@types/koa__multer": "2.0.2", - "@types/koa__router": "8.0.4", "@types/koa-bodyparser": "4.3.0", "@types/koa-cors": "0.0.0", "@types/koa-favicon": "2.0.19", @@ -76,6 +73,9 @@ "@types/koa-mount": "4.0.0", "@types/koa-send": "4.1.2", "@types/koa-views": "2.0.4", + "@types/koa__cors": "3.0.2", + "@types/koa__multer": "2.0.2", + "@types/koa__router": "8.0.4", "@types/markdown-it": "12.0.1", "@types/matter-js": "0.14.10", "@types/mocha": "8.2.1", @@ -236,6 +236,7 @@ "ts-loader": "8.0.18", "ts-node": "9.1.1", "tsc-alias": "1.2.8", + "tsconfig-paths": "3.9.0", "tslint": "6.1.3", "tslint-sonarts": "1.9.0", "typeorm": "0.2.31", diff --git a/test/tsconfig.json b/test/tsconfig.json index 987067ba8..31a537805 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -21,6 +21,10 @@ "emitDecoratorMetadata": true, "resolveJsonModule": true, "isolatedModules": true, + "baseUrl": "./", + "paths": { + "@/*": ["../src/*"] + }, "typeRoots": [ "../node_modules/@types", "../src/@types" diff --git a/yarn.lock b/yarn.lock index 1ca450426..711b9d059 100644 --- a/yarn.lock +++ b/yarn.lock @@ -683,6 +683,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/jsonld@1.5.5": version "1.5.5" resolved "https://registry.yarnpkg.com/@types/jsonld/-/jsonld-1.5.5.tgz#c2238462a83e90f003929cef6a36eded2ceed069" @@ -9850,6 +9855,11 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -10424,6 +10434,16 @@ tsc-alias@1.2.8: globby "^11.0.2" normalize-path "^3.0.0" +tsconfig-paths@3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tslib@^1.13.0: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"