-
Notifications
You must be signed in to change notification settings - Fork 773
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
Monorepo: Vitest Test Transition / ESM Part 2 #2764
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
29b4b4c
to
ccb8fd3
Compare
packages/common/package.json
Outdated
"docs:build": "typedoc --options typedoc.js", | ||
"lint": "../../config/cli/lint.sh", | ||
"lint:diff": "../../config/cli/lint-diff.sh", | ||
"lint:fix": "../../config/cli/lint-fix.sh", | ||
"prepublishOnly": "../../config/cli/prepublish.sh", | ||
"tape": "tape -r ts-node/register", | ||
"test": "npm run test:node && npm run test:browser", | ||
"test:browser": "karma start karma.conf.js", | ||
"test:node": "npm run tape -- ./test/*.spec.ts", | ||
"test:browser": "npx vitest run --browser=chrome", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"test:browser": "npx vitest run --browser=chrome", | |
"test:browser": "npx vitest run --browser.name=chrome --browser.headless |
dfb4171
to
32c4d42
Compare
@@ -14,10 +14,9 @@ import { BlockHeader } from '../src/header.js' | |||
import { fakeExponential, getNumBlobs } from '../src/helpers.js' | |||
import { Block } from '../src/index.js' | |||
|
|||
import * as gethGenesis from './testdata/4844-hardfork.json' | |||
import gethGenesis from './testdata/4844-hardfork.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH: on these cases I always totally have no idea what version to take and what difference this makes. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one, if I understand how Typescript works with ESM, a namespace import like this converts the JSON into an object with a default export so it imported it as { "default": [ blocksData ] }
instead of [ blocksData ]
.
bd4c9c4
to
bd3f1b2
Compare
65b71ef
to
d20eaa2
Compare
Rebased this and added various lint fixes |
* VM: fix linting * VM: add .js path references * Ethash: tape -> vitest transition * Ethash: ad .js file path references
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very excited to merge this. Now, ethash please cooperate and pass so we can merge.
Transition of Tape tests to Vitest, also ESM .js file reference integration.
First results look promising 🙂.