Skip to content

Commit

Permalink
Merge pull request #3 from ir-engine/type-module-vite-node-test
Browse files Browse the repository at this point in the history
Type module vite node test
  • Loading branch information
HexaField authored Oct 10, 2024
2 parents 41c1537 + 7a904ad commit d98035b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 63 deletions.
21 changes: 0 additions & 21 deletions .mocharc.js

This file was deleted.

11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@ir-engine/ir-bot",
"version": "0.5.8",
"type": "module",
"description": "A test bot using puppeteer",
"repository": {
"type": "git",
Expand All @@ -17,8 +18,8 @@
"scripts": {
"build": "tsc",
"check-errors": "tsc --noemit",
"dev": "ts-node --swc ./src/index.ts",
"dev-koa": "ts-node --swc ./src/index_koa.ts",
"dev": "vite-node ./src/index.ts",
"dev-koa": "vite-node ./src/index_koa.ts",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"format-scss": "stylelint \"**/*.scss\" --fix",
"format-staged": "lint-staged",
Expand All @@ -34,17 +35,13 @@
"koa-router": "^12.0.0",
"localforage": "^1.10.0",
"puppeteer": "^19.6.3",
"ts-node": "10.9.1",
"webxr-polyfill": "github:felixtrz/webxr-polyfill#81d2db4f01b518f2c42b74a90973dac095515e9f"
},
"license": "ISC",
"devDependencies": {
"vitest": "2.0.4",
"@swc/core": "1.3.41",
"@types/expect-puppeteer": "^5.0.3",
"@types/koa-bodyparser": "^4.3.10",
"@types/koa-router": "^7.4.4",
"@types/mocha": "^10.0.1"
"@types/koa-router": "^7.4.4"
},
"pre-commit": [
"format-staged"
Expand Down
4 changes: 2 additions & 2 deletions src/bot/utils/make-user-admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import { v4 } from 'uuid'
import { ScopeID, ScopeTypeInterface, scopePath } from '@ir-engine/common/src/schemas/scope/scope.schema'
import { UserType, userPath } from '@ir-engine/common/src/schemas/user/user.schema'

const dotenv = require('dotenv-flow')
import dotenv from 'dotenv-flow'
import appRootPath from 'app-root-path'
const { scopeTypeSeed } = require('@ir-engine/server-core/src/scope/scope-type/scope-type.seed')
import { scopeTypeSeed } from '@ir-engine/server-core/src/scope/scope-type/scope-type.seed'

dotenv.config({
path: appRootPath.path,
Expand Down
11 changes: 0 additions & 11 deletions tests/mocha.env.js

This file was deleted.

37 changes: 15 additions & 22 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
{
"compilerOptions": {
"target": "esnext",
"lib": [
"esnext",
"dom",
"dom.iterable"
],
"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": "./dist",
"types": ["vite/client", "@types/mocha"]
"declaration": false,
"types": ["@types/node"]
},
"exclude": [
"../projects/projects/**",
"**/node_modules/**"
],
"include": [
"../../../../../__global.d.ts",
"../../../../server-core/src/*",
"../../../../client-core/src/*",
"./**/*.ts",
"./**/*.tsx"
"../../../../client-core/src/",
"../../../../server-core/src/",
"./src"
]
}
8 changes: 8 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
environment: 'jsdom',
passWithNoTests: true
}
})

0 comments on commit d98035b

Please sign in to comment.