mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +02:00
chore: update jest config
This commit is contained in:
parent
a2c96e4c08
commit
ccb9d32def
18 changed files with 103 additions and 58 deletions
|
@ -10,11 +10,11 @@
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fluentui/react": "^8.101.0",
|
"@fluentui/react": "^8.101.1",
|
||||||
"@fluentui/react-file-type-icons": "^8.8.1",
|
"@fluentui/react-file-type-icons": "^8.8.2",
|
||||||
"@fluentui/react-hooks": "^8.6.13",
|
"@fluentui/react-hooks": "^8.6.14",
|
||||||
"@fluentui/react-icons": "^2.0.187",
|
"@fluentui/react-icons": "^2.0.187",
|
||||||
"@fluentui/style-utilities": "^8.8.2",
|
"@fluentui/style-utilities": "^8.8.3",
|
||||||
"@griffel/react": "^1.4.2",
|
"@griffel/react": "^1.4.2",
|
||||||
"@yume-chan/adb": "workspace:^0.0.17",
|
"@yume-chan/adb": "workspace:^0.0.17",
|
||||||
"@yume-chan/adb-backend-direct-sockets": "workspace:^0.0.9",
|
"@yume-chan/adb-backend-direct-sockets": "workspace:^0.0.9",
|
||||||
|
|
6
common/config/rush/pnpm-lock.yaml
generated
6
common/config/rush/pnpm-lock.yaml
generated
|
@ -263,17 +263,23 @@ importers:
|
||||||
|
|
||||||
../../libraries/event:
|
../../libraries/event:
|
||||||
specifiers:
|
specifiers:
|
||||||
|
'@jest/globals': ^29.3.1
|
||||||
'@yume-chan/async': ^2.2.0
|
'@yume-chan/async': ^2.2.0
|
||||||
'@yume-chan/ts-package-builder': workspace:^1.0.0
|
'@yume-chan/ts-package-builder': workspace:^1.0.0
|
||||||
|
cross-env: ^7.0.3
|
||||||
jest: ^29.3.1
|
jest: ^29.3.1
|
||||||
|
ts-jest: ^29.0.3
|
||||||
tslib: ^2.4.1
|
tslib: ^2.4.1
|
||||||
typescript: ^4.8.4
|
typescript: ^4.8.4
|
||||||
dependencies:
|
dependencies:
|
||||||
'@yume-chan/async': 2.2.0
|
'@yume-chan/async': 2.2.0
|
||||||
tslib: 2.4.1
|
tslib: 2.4.1
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@jest/globals': 29.3.1
|
||||||
'@yume-chan/ts-package-builder': link:../../toolchain/ts-package-builder
|
'@yume-chan/ts-package-builder': link:../../toolchain/ts-package-builder
|
||||||
|
cross-env: 7.0.3
|
||||||
jest: 29.3.1
|
jest: 29.3.1
|
||||||
|
ts-jest: 29.0.3_r24ewcothphvclnu77pxb4u4se
|
||||||
typescript: 4.8.4
|
typescript: 4.8.4
|
||||||
|
|
||||||
../../libraries/scrcpy:
|
../../libraries/scrcpy:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
|
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
|
||||||
{
|
{
|
||||||
"pnpmShrinkwrapHash": "3f99df4199add0c084fab9d283e9f43b2adf174a",
|
"pnpmShrinkwrapHash": "a5230b60dfdc157f1b6b6e61fce235ca39969a33",
|
||||||
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
module.exports = {
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
testMatch: ['<rootDir>/cjs/**/*.spec.js'],
|
export default {
|
||||||
testEnvironment: 'node',
|
preset: "ts-jest/presets/default-esm",
|
||||||
|
transform: {
|
||||||
|
"\\.tsx?$": [
|
||||||
|
"ts-jest",
|
||||||
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
moduleNameMapper: {
|
||||||
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "build-ts-package",
|
"build": "build-ts-package",
|
||||||
"build:watch": "build-ts-package --incremental",
|
"build:watch": "build-ts-package --incremental",
|
||||||
"//test": "jest --coverage",
|
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -36,8 +36,11 @@
|
||||||
"tslib": "^2.4.1"
|
"tslib": "^2.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@jest/globals": "^29.3.1",
|
||||||
"@yume-chan/ts-package-builder": "workspace:^1.0.0",
|
"@yume-chan/ts-package-builder": "workspace:^1.0.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
"jest": "^29.3.1",
|
"jest": "^29.3.1",
|
||||||
|
"ts-jest": "^29.0.3",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import { AutoDisposable, Disposable } from './disposable.js';
|
import { describe, expect, it, jest } from "@jest/globals";
|
||||||
|
|
||||||
describe('Event', () => {
|
import { AutoDisposable, Disposable } from "./disposable.js";
|
||||||
describe('AutoDisposable', () => {
|
|
||||||
it('should dispose its dependencies', () => {
|
describe("Event", () => {
|
||||||
|
describe("AutoDisposable", () => {
|
||||||
|
it("should dispose its dependencies", () => {
|
||||||
const myDisposable = {
|
const myDisposable = {
|
||||||
dispose: jest.fn(),
|
dispose: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
3
libraries/event/tsconfig.build.json
Normal file
3
libraries/event/tsconfig.build.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"extends": "./node_modules/@yume-chan/ts-package-builder/tsconfig.base.json"
|
||||||
|
}
|
|
@ -1,3 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "./node_modules/@yume-chan/ts-package-builder/tsconfig.base.json",
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "./tsconfig.test.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./tsconfig.build.json"
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
8
libraries/event/tsconfig.test.json
Normal file
8
libraries/event/tsconfig.test.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.build.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"types": [
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"exclude": []
|
||||||
|
}
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b tsconfig.build.json",
|
"build": "tsc -b tsconfig.build.json",
|
||||||
"build:watch": "tsc -b tsconfig.build.json",
|
"build:watch": "tsc -b tsconfig.build.json",
|
||||||
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
"//test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b tsconfig.build.json",
|
"build": "tsc -b tsconfig.build.json",
|
||||||
"build:watch": "tsc -b tsconfig.build.json",
|
"build:watch": "tsc -b tsconfig.build.json",
|
||||||
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
"//test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
/** @type {import('ts-jest').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: "ts-jest/presets/default-esm",
|
preset: "ts-jest/presets/default-esm",
|
||||||
globals: {
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
'ts-jest': {
|
transform: {
|
||||||
tsconfig: 'tsconfig.test.json',
|
"^.+\\.tsx?$": [
|
||||||
useESM: true,
|
"ts-jest",
|
||||||
},
|
{ tsconfig: "tsconfig.test.json", useESM: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue