Files
lodestar/packages/params/package.json
Nazar Hussain c91cd9c141 test: use vitest workspace to run all tests (#7610)
**Motivation**

Vitest workspaces is feature to mimic the package manager workspaces for
the tests only.

It provides following benefits:

1. Minimize the need the bunch of config files at every package root 
2. Consolidate vitest configuration in project groups
3. Use consistent test configuration for all projects in the monorepo
4. Providing consistent test environment for all packages
5. Speed up visual interaction with tests in the IDEs (e.g. Visual
Studio Code)

**Description**

- Remove all unnecessary config files
- Update package json scripts to use `--project` flag

Closes #7603


Now we have following test directories. 

| Directory | Description | CurrentPreset | Old Preset | 
|---|---|---|---|
| test/unit | Unit tests | minimal | Default export from `params`
package |
| test/unit-mainnet | Unit tests | mainnet | mainnet | 
| test/e2e | End-to-End Tests | minimal | Default export from `params`
package |
| test/e2e-mainnet | End-to-End Tests | mainnet | Never existed before,
mixed up pattern in different packages |
| test/spec | Spec tests | minimal | Default export from `params`
package, but common perception among team was that it's running with
`minimal` |
| test/spec-mainnet` | Spec tests | mainnet | Never existed as
directory, but mixed up among packages |
| test/browser | Symlink to `unit` for packages which supports browsers
| minimal | Default export from `params` package |
| test/types | Types test | minimal | Default export from `params`
package |


**Steps to test or reproduce**

Run all tests
2025-04-22 11:33:36 +02:00

77 lines
1.8 KiB
JSON

{
"name": "@lodestar/params",
"version": "1.29.0",
"description": "Chain parameters required for lodestar",
"author": "ChainSafe Systems",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/ChainSafe/lodestar/issues"
},
"homepage": "https://github.com/ChainSafe/lodestar#readme",
"type": "module",
"exports": {
".": {
"import": "./lib/index.js"
},
"./presets/mainnet": {
"import": "./lib/presets/mainnet.js"
},
"./presets/minimal": {
"import": "./lib/presets/minimal.js"
},
"./presets/gnosis": {
"import": "./lib/presets/gnosis.js"
},
"./setPreset": {
"import": "./lib/setPreset.js"
}
},
"types": "lib/index.d.ts",
"files": [
"lib/**/*.js",
"lib/**/*.js.map",
"lib/**/*.d.ts",
"*.d.ts",
"*.js"
],
"typesVersions": {
"*": {
"*": [
"*",
"lib/*",
"lib/*/index"
]
}
},
"scripts": {
"clean": "rm -rf lib && rm -f *.tsbuildinfo",
"build": "tsc -p tsconfig.build.json",
"build:release": "yarn clean && yarn build",
"build:watch": "yarn run build --watch",
"check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"",
"check-types": "tsc",
"lint": "biome check src/ test/",
"lint:fix": "yarn run lint --write",
"test": "yarn test:unit",
"test:unit": "vitest run --project unit",
"test:browsers": "vitest run --project browser",
"test:e2e": "vitest run --project e2e",
"check-readme": "typescript-docs-verifier"
},
"repository": {
"type": "git",
"url": "git+https://github.com:ChainSafe/lodestar.git"
},
"keywords": [
"ethereum",
"eth-consensus",
"beacon",
"blockchain"
],
"devDependencies": {
"@types/js-yaml": "^4.0.5",
"axios": "^1.3.4",
"js-yaml": "^4.1.0"
}
}