Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vscode not resolving test types #5294

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions ironfish-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@
"yarn": "^1.22.10"
},
"scripts": {
"build": "tsc -b",
"lint": "tsc -b && eslint --ext .ts,.tsx,.js,.jsx src/",
"build": "tsc -b tsconfig.build.json",
"build:tests": "tsc -b",
"lint": "yarn build && eslint --ext .ts,.tsx,.js,.jsx src/",
"lint:deprecated": "yarn lint --rule \"deprecation/deprecation: warn\"",
"lint:fix": "tsc -b && eslint --ext .ts,.tsx,.js,.jsx src/ --fix",
"lint:fix": "yarn build && eslint --ext .ts,.tsx,.js,.jsx src/ --fix",
"start:dev": "node start",
"start": "yarn build && yarn start:js",
"start:js": "cross-env OCLIF_TS_NODE=0 IRONFISH_DEBUG=1 node --expose-gc --inspect=:0 --inspect-publish-uid=http --enable-source-maps bin/run",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
"test:coverage:html": "tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns --coverage --coverage-reporters html",
"test:watch": "yarn clean && tsc -b && tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --coverage false",
"test:coverage:html": "yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns --coverage --coverage-reporters html",
"test:watch": "yarn clean && yarn build && yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --coverage false",
"postpack": "rimraf oclif.manifest.json",
"clean": "rimraf build",
"prepack": "rimraf build && yarn build && oclif manifest && oclif readme",
Expand Down
14 changes: 14 additions & 0 deletions ironfish-cli/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../config/tsconfig.base.json",
"compilerOptions": {
"lib": ["es2020"],
"outDir": "build",
"rootDir": "./",
"tsBuildInfoFile": "./build/tsconfig.tsbuildinfo"
},
"include": ["src", "./package.json"],
"exclude": ["src/**/*.test.*"],
"references": [
{ "path": "../ironfish/tsconfig.build.json" },
]
}
10 changes: 3 additions & 7 deletions ironfish-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
"extends": "../config/tsconfig.base.json",
"compilerOptions": {
"lib": ["es2020"],
"outDir": "build",
"rootDir": "./",
"tsBuildInfoFile": "./build/tsconfig.tsbuildinfo"
"noEmit": true
},
"include": ["src", "./package.json"],
"references": [
{ "path": "../ironfish" },
]
"include": ["src", "package.json"],
"references": [{ "path": "../ironfish/tsconfig.build.json" }]
}
9 changes: 0 additions & 9 deletions ironfish-cli/tsconfig.test.json

This file was deleted.

24 changes: 12 additions & 12 deletions ironfish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@
"yup": "0.29.3"
},
"scripts": {
"build": "tsc -b",
"build:watch": "tsc -b -w",
"build:tests": "tsc -b tsconfig.test.json",
"lint": "tsc -b && tsc -b tsconfig.test.json && eslint --ext .ts,.tsx,.js,.jsx src/",
"lint:fix": "tsc -b && tsc -b tsconfig.test.json && eslint --ext .ts,.tsx,.js,.jsx src/ --fix",
"start": "tsc -b -w",
"test": "tsc -b && tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules RUST_BACKTRACE=1 jest --testTimeout=${JEST_TIMEOUT:-5000}",
"test:slow": "tsc -b && tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules TEST_INIT_RUST=true RUST_BACKTRACE=1 jest --testMatch \"**/*.test.slow.ts\" --testPathIgnorePatterns --testTimeout=${JEST_TIMEOUT:-60000}",
"test:perf": "tsc -b && tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules TEST_INIT_RUST=true jest --testMatch \"**/*.test.perf.ts\" --testPathIgnorePatterns --testTimeout=${JEST_TIMEOUT:-600000} --runInBand",
"test:perf:report": "tsc -b && tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules TEST_INIT_RUST=true GENERATE_TEST_REPORT=true jest --config jest.config.js --testMatch \"**/*.test.perf.ts\" --testPathIgnorePatterns --testTimeout=${JEST_TIMEOUT:-600000} --ci",
"test:coverage:html": "tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns --coverage --coverage-reporters html",
"test:watch": "tsc -b tsconfig.test.json && cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --coverage false",
"build": "tsc -b tsconfig.build.json",
"build:tests": "tsc -b",
"build:watch": "tsc -b -w tsconfig.build.json",
"lint": "yarn build && yarn build:tests && eslint --ext .ts,.tsx,.js,.jsx src/",
"lint:fix": "yarn build && yarn build:tests && eslint --ext .ts,.tsx,.js,.jsx src/ --fix",
"start": "tsc -b -w tsconfig.build.json",
"test": "yarn build && yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules RUST_BACKTRACE=1 jest --testTimeout=${JEST_TIMEOUT:-5000}",
"test:slow": "yarn build && yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules TEST_INIT_RUST=true RUST_BACKTRACE=1 jest --testMatch \"**/*.test.slow.ts\" --testPathIgnorePatterns --testTimeout=${JEST_TIMEOUT:-60000}",
"test:perf": "yarn build && yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules TEST_INIT_RUST=true jest --testMatch \"**/*.test.perf.ts\" --testPathIgnorePatterns --testTimeout=${JEST_TIMEOUT:-600000} --runInBand",
"test:perf:report": "yarn build && yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules TEST_INIT_RUST=true GENERATE_TEST_REPORT=true jest --config jest.config.js --testMatch \"**/*.test.perf.ts\" --testPathIgnorePatterns --testTimeout=${JEST_TIMEOUT:-600000} --ci",
"test:coverage:html": "yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns --coverage --coverage-reporters html",
"test:watch": "yarn build:tests && cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch --coverage false",
"fixtures:regenerate": "find . -name \"__fixtures__\" | xargs rm -rf && NODE_OPTIONS=--experimental-vm-modules JEST_TIMEOUT=1000000000 yarn run test && NODE_OPTIONS=--experimental-vm-modules JEST_TIMEOUT=1000000000 yarn run test:slow && NODE_OPTIONS=--experimental-vm-modules JEST_TIMEOUT=1000000000 yarn run test:perf"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../config/tsconfig.base.json",
"compilerOptions": {
"noEmit": true,
"tsBuildInfoFile": "./build/tsconfig.tsbuildinfo"
"outDir": "build"
},
"include": ["src", "package.json"],
"exclude": ["src/**/*.test.*"],
}
4 changes: 2 additions & 2 deletions ironfish/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../config/tsconfig.base.json",
"compilerOptions": {
"outDir": "build"
"noEmit": true,
"tsBuildInfoFile": "./build/tsconfig.tsbuildinfo"
},
"include": ["src", "package.json"],
"exclude": ["src/**/*.test.*"],
}