Commit Graph

13 Commits

Author SHA1 Message Date
Nazar Hussain
0c6f50771f chore: use latest TS module resolution (#8419)
**Motivation**

Use latest `module` and `moduleResolution` for TS.

**Description**

- To use [subpath
imports](https://nodejs.org/api/packages.html#subpath-imports) in the PR
#8320 we need to update the module solution strategy for TS.
- That requires to change the `module` for the TS as well. 
- Earlier tried to stay with `node18` or `node20`, but the `ts-node`
does not work with that.
- Maintaining different tsconfig for ts-node is more of hassle on wrong
run.
- So decided to stick with `nodenext` strategy for `moduleResolution` 

**Steps to test or reproduce**

Run all tests

---------

Co-authored-by: Cayman <caymannava@gmail.com>
2025-09-18 11:36:48 -04:00
Nazar Hussain
2f71baeaa0 test: finalized sync e2e post electra only (#8340)
**Motivation**

- run a node starting from electra passing through fulu
- start another node to do range sync and try to catch up

**Description**

- to reproduce the issue in #8247
```
../../node_modules/.bin/vitest test/e2e/sync/finalizedSync.test.ts
```

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
2025-09-09 08:50:16 +07:00
Nazar Hussain
c43b070f98 chore: update the performance tests to use @chainsafe/benchmark (#7373) 2025-01-31 07:55:01 +01:00
Nazar Hussain
06b4c2d324 chore: fix import order with biome syntax (#7211)
Fix import order
2024-11-01 17:14:21 +01:00
Nazar Hussain
4e853d65c9 style: enable all biomejs recommended rules (#7153)
* Enable recomended correctness/noVoidTypeReturn

* Enable recomended rule correctness/useYield

* Enable recomended rule performance/noAccumulatingSpread

* Enable recomended rule performance/noDelete

* Enable recomended rule suspicious/noAsyncPromiseExecutor

* Enable recommended rule suspicious/noDoubleEquals

* Enable recommended rule suspicious/noDuplicateTestHooks

* Enable recommended rule suspicious/noExportsInTest

* Enable recommended rule suspicious/noFallthroughSwitchClause

* Enable recommended rule suspicious/noGlobalIsFinite

* Enable recommended rule suspicious/noGlobalIsNan

* Enable recommended rule suspicious/noPrototypeBuiltins

* Enable recommended rule suspicious/noShadowRestrictedNames

* Enable recommended rule suspicious/useDefaultSwitchClauseLast

* Enable recommended rule suspicious/useGetterReturn

* Enable recommended rule style/noUnusedTemplateLiteral

* Convert default case to unreachable code

* Enable recommended rule complexity/noForEach

* Enable recommended rule complexity/noThisInStatic

* Enable recommended rule complexity/useFlatMap

* Enable recommended rule complexity/useOptionalChain

* Enable recommended rule complexity/useRegexLiterals

* Reorganize the config structure

* Fix few typos

* Revert "Enable recomended rule performance/noDelete"

This reverts commit 6cc060b03c.

* Fix formatting

* Enable recommended rule style/noUselessElse

* Enable recommended rule complexity/useLiteralKeys

* Enable recommended rule complexity/useArrowFunction

* Fix few types

* Fix a test file

* Fix formatting

* Enable recommended rule suspicious/noImplicitAnyLet

* Enable recommended rule complexity/noUselessEmptyExport

* Fix types

* Fix unti tests

* Fix unit test

* Fix lint error

* Fix a unit test pattern

* Fix formatting
2024-10-14 14:55:14 -04:00
Nazar Hussain
5c359f92dc deps: migrate to biomejs from eslint (#7108)
* Replace eslint with biomejs

* Update the inclusion of word

* Fix the formatting

* Update the lint task to do all checks

* Update biome rules from eslint config

* Replace eslint with biomejs

* Update the inclusion of word

* Fix the formatting

* Update the lint task to do all checks

* Update biome rules from eslint config

* Fix all lint issues

* Fix formatting

* Add extension recomendation for vscode

* Enable recommended rules

* Enable rule noUselessSwitchCase

* Enable rule noUselessConstructor

* Fix the types

* Fix unit tests

* Enforce import extensions

* Update the cli command

* Enforce useConsistentMemberAccessibility

* Update rules

* Fix rules

* Upgrade biomejs to latest version

* Update the rules

* Update and format the config file

* Fix types break during merge

* Fix unused check

* Add comment for explicit-return-type

* Remove eslint file

* Add _e objects for empty catch blocks

* Update formatter config

* Fix formatting
2024-10-10 12:43:36 -04:00
Nico Flaig
c3523e1b8c chore: clean up prettier-ignore in tests (#6464)
* chore: clean up prettier-ignore in tests

* setConfig needs to be called in describe

* Set test timeout as hookTimeout

* Rename variable

* Remove unrelated change

* Better name for min capella time variable
2024-02-22 16:57:59 -05:00
Nico Flaig
194334626e chore: remove unused eslint disable directives (#6444)
* Remove unused eslint disable directives

* Update yarn lint to report unused eslint disable directives
2024-02-17 09:22:36 -05:00
tuyennhv
863ee5f625 fix: getAttestationsForBlock performance issue (#6367)
* chore: enhance perf tests for getAttestationsForBlock

* refactor: group attestations, cache forkchoice validation

* fix: return only not seen indices for notSeenValidatorFn

* fix: lint

* chore: bring back finalizedSync.test.ts
2024-02-01 14:51:07 -05:00
Nazar Hussain
bfe5da8b9e Merge e2e tests to sim tests (#4759)
* Remove already covered tests

* Move some instance functions to pure functions to be reuseable

* Add uknonw block parent assertions

* Update the wait time

* Update block error message

* Disable range sync for the uknown block sync node

* Update the failing unit tests

* Use getBlockV2 instead of getBlock

* Fix linter warnings

* Remove unknownBlockSync test covered in sim tests

* Move few e2e tests to sim tests

* Update the sim run command

* Update docker runner

* Fix child process stopping issue

* Remove unnecessary e2e tests

* Fix unit tests for new beacon options

* Update a unit test

* Remove an accidental committed file

* Add sync check for the unkown sync node

* Add simulation repoter interface

* Update tracker event handling

* Update repoter

* Add logging for debugging

* Update logic for head checking
2022-11-16 10:36:51 +01:00
Lion - dapplion
91a5a064fe Move winston NodeJS transports to cli package (#4509)
* Move winston NodeJS transports to cli package

* Remove old profile test

* Fix types in beacon-node test

* Remove logger.important usage

* Use function constructor

* Enable customization of logLevel per module

* Don't mutate module on print

* Update logger options

* Update logger cli tests

* Remove dynamic log level test

* Check-types

* Remove legacy item

* Use LoggerModule for vmon
2022-09-06 09:59:40 -05:00
Lion - dapplion
938032c88c Disable workers for e2e test runs (#4325) 2022-07-18 21:49:09 +02:00
Cayman
e5dabac124 Rename packages using @lodestar namespace (#4231)
* Remove event handlers file

* exposing util module from the light-client package

* Rename packages using @lodestar namespace

* Fix linter errors

* Fix merge

Co-authored-by: dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: Dadepo Aderemi <dadepo@gmail.com>
2022-07-06 12:30:36 -05:00