diff --git a/.mocharc.js b/.mocharc.js deleted file mode 100644 index eb33b34..0000000 --- a/.mocharc.js +++ /dev/null @@ -1,47 +0,0 @@ - -/* -CPAL-1.0 License - -The contents of this file are subject to the Common Public Attribution License -Version 1.0. (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at -https://github.com/ir-engine/ir-engine/blob/dev/LICENSE. -The License is based on the Mozilla Public License Version 1.1, but Sections 14 -and 15 have been added to cover use of software over a computer network and -provide for limited attribution for the Original Developer. In addition, -Exhibit A has been modified to be consistent with Exhibit B. - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -specific language governing rights and limitations under the License. - -The Original Code is Infinite Reality Engine. - -The Original Developer is the Initial Developer. The Initial Developer of the -Original Code is the Infinite Reality Engine team. - -All portions of the code written by the Infinite Reality Engine team are Copyright © 2021-2023 -Infinite Reality Engine. All Rights Reserved. -*/ - -module.exports = { - failZero: false, - parallel: false, - require: [ - 'tests/mocha.env', // init env here - 'jsdom-global/register' - ], - spec: [ - './**/*.test.ts', - './**/*.test.tsx' - ], - extension: [ - 'ts', - 'tsx' - ], - bail: true, - exit: true, - recursive: true, - jobs: '1', - timeout: '60000' -}; diff --git a/package.json b/package.json index c31b4b5..e5e31f5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@ir-engine/ir-template", "version": "0.0.0", "scripts": { - "test": "mocha --config .mocharc.js", + "test": "vitest run", "check-errors": "tsc --noemit", "format": "prettier --write \"**/*.{ts,tsx}\"", "format-scss": "stylelint \"**/*.scss\" --fix", diff --git a/tests/dummy.test.ts b/tests/dummy.test.ts deleted file mode 100644 index fe16ae6..0000000 --- a/tests/dummy.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* -CPAL-1.0 License - -The contents of this file are subject to the Common Public Attribution License -Version 1.0. (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at -https://github.com/ir-engine/ir-engine/blob/dev/LICENSE. -The License is based on the Mozilla Public License Version 1.1, but Sections 14 -and 15 have been added to cover use of software over a computer network and -provide for limited attribution for the Original Developer. In addition, -Exhibit A has been modified to be consistent with Exhibit B. - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -specific language governing rights and limitations under the License. - -The Original Code is Infinite Reality Engine. - -The Original Developer is the Initial Developer. The Initial Developer of the -Original Code is the Infinite Reality Engine team. - -All portions of the code written by the Infinite Reality Engine team are Copyright © 2021-2023 -Infinite Reality Engine. All Rights Reserved. -*/ diff --git a/tests/mocha.env.js b/tests/mocha.env.js deleted file mode 100644 index a7e83e3..0000000 --- a/tests/mocha.env.js +++ /dev/null @@ -1,37 +0,0 @@ - -/* -CPAL-1.0 License - -The contents of this file are subject to the Common Public Attribution License -Version 1.0. (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at -https://github.com/ir-engine/ir-engine/blob/dev/LICENSE. -The License is based on the Mozilla Public License Version 1.1, but Sections 14 -and 15 have been added to cover use of software over a computer network and -provide for limited attribution for the Original Developer. In addition, -Exhibit A has been modified to be consistent with Exhibit B. - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -specific language governing rights and limitations under the License. - -The Original Code is Infinite Reality Engine. - -The Original Developer is the Initial Developer. The Initial Developer of the -Original Code is the Infinite Reality Engine team. - -All portions of the code written by the Infinite Reality Engine team are Copyright © 2021-2023 -Infinite Reality Engine. All Rights Reserved. -*/ - -process.env.APP_ENV = 'test' -process.env.NODE_ENV = 'test' -process.env.NODE_TLS_REJECT_UNAUTHORIZED='0' - -require("ts-node").register({ - project: './tsconfig.json', - files: true, - swc: true -}) - -require("fix-esm").register() diff --git a/tsconfig.json b/tsconfig.json index f74206a..bd1c6c5 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,37 +1,35 @@ { "compilerOptions": { - "target": "esnext", - "lib": ["esnext", "dom", "dom.iterable", "WebWorker"], - "allowJs": true, + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext", "DOM", "DOM.Iterable"], "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, + "moduleResolution": "node", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", "noEmit": true, - "module": "CommonJS", + "allowJs": true, + "forceConsistentCasingInFileNames": true, "strict": false, "strictNullChecks": true, "strictBindCallApply": true, "noImplicitAny": false, "resolveJsonModule": true, "esModuleInterop": true, - "moduleResolution": "node", "sourceMap": true, "jsx": "react", - "isolatedModules": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "emitDecoratorMetadata": true, - "declaration": true, - "outDir": "./lib", - "types": ["vite/client", "mocha"] + "declaration": false, + "types": ["@types/node"] }, - "exclude": [ - "**/node_modules/**" - ], "include": [ "../../../../../__global.d.ts", - "../../../../server-core/src/*", - "../../../../client-core/src/*", - "./**/*.ts", - "./**/*.tsx" + "../../../../client-core/src/", + "../../../../server-core/src/", + "./src" ] }