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

repo: update vitest #3191

Closed
wants to merge 87 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
853ed63
repo: update vitest
jochem-brouwer Dec 13, 2023
2c4620b
update vitest
jochem-brouwer Jan 8, 2024
585e484
Fix nested tests
acolytec3 Dec 14, 2023
2276696
Fix nested tests
acolytec3 Dec 14, 2023
8133afb
fix tests
jochem-brouwer Jan 8, 2024
ab693ca
evm: lint
jochem-brouwer Jan 8, 2024
ea1cbbc
fix more tests
jochem-brouwer Jan 8, 2024
179fc25
fix warnings and lint errors
ScottyPoi Jan 10, 2024
0ccca2a
client: fix rlpxserver.spec.ts nesting
ScottyPoi Jan 11, 2024
4ee5762
client: fix test nesting in fetcher.spec.ts
ScottyPoi Jan 11, 2024
93a08af
client: fetcher.spec.ts - extend timeout to 200ms
ScottyPoi Jan 11, 2024
58c4578
client/test/rpc/eth: fix nesting and timeout issues
ScottyPoi Jan 11, 2024
6a56207
wallet/test: fix nesting timeout issue
ScottyPoi Jan 11, 2024
0ed392a
wallet/test: fix nesting and timeouts
ScottyPoi Jan 11, 2024
081784c
fix versions for browser deps
ScottyPoi Jan 11, 2024
2f826bf
rlp: fix integration errors with await import
ScottyPoi Jan 11, 2024
f1b6d7e
util: fix browser test errors from 'events' module import
ScottyPoi Jan 11, 2024
6a54056
util: fix test nesting
ScottyPoi Jan 11, 2024
8c29a91
wallet: add assert.fail() to try/catch based tests
ScottyPoi Jan 12, 2024
eeeabe2
wallet: alter promise based tests
ScottyPoi Jan 12, 2024
9feb873
wallet: add config file and increase test timeout
ScottyPoi Jan 12, 2024
1c5c5c3
common: add test config with polyfill
ScottyPoi Jan 12, 2024
fff07a7
rlp: add node polyfill to browser test
ScottyPoi Jan 12, 2024
9ef38d1
util: add node polyfill plugin to vitest browser config
ScottyPoi Jan 12, 2024
b6a992b
common: use eventemitter3 in browser mode
ScottyPoi Jan 12, 2024
23a6667
config: use global vitest.browser.config file for shared settings
ScottyPoi Jan 12, 2024
2a2b8dc
block: Fixes for browser mode
ScottyPoi Jan 12, 2024
c7b081b
trie: fix browser mode tests
ScottyPoi Jan 12, 2024
d89052b
tx: fix for browser mode tests
ScottyPoi Jan 12, 2024
1e03762
blockchain: fix for browser mode tests
ScottyPoi Jan 12, 2024
c4c3be5
wallet: fix for browser mode tests
ScottyPoi Jan 12, 2024
7e21a21
statemanager: fix for browser mode tests
ScottyPoi Jan 12, 2024
49d8fb5
evm: fix for browser mode tests
ScottyPoi Jan 12, 2024
a91c706
block: fix for header.spec browser mode
ScottyPoi Jan 12, 2024
ecffe09
codecov: ignore vitest.config files
ScottyPoi Jan 12, 2024
1f35f36
util: merge config with baseconfig
ScottyPoi Jan 13, 2024
7bdbab5
util: remove skips from from asyncEventEmitter tests
ScottyPoi Jan 13, 2024
d7ba0b7
client: use top level import in fullethereumservice.spec.ts
ScottyPoi Jan 14, 2024
15e91ac
header.spec.ts: move compare function outside of tests
ScottyPoi Jan 14, 2024
5d29831
update vitest to v1.2
ScottyPoi Jan 14, 2024
d1959de
CI browser: move block test to last
ScottyPoi Jan 14, 2024
ea2d1ca
workflow: use --include=peer instead of second install script
ScottyPoi Jan 14, 2024
1ff39f3
block: revert import change in header.spec
ScottyPoi Jan 16, 2024
0458823
peerDeps: pin specific versions
ScottyPoi Jan 16, 2024
e824e07
**/test: branch PR cleanup
ScottyPoi Jan 16, 2024
434259a
mono: cleanup package.json and workflow browser.yml
ScottyPoi Jan 16, 2024
b3eac54
browser: edit workflow script
ScottyPoi Jan 17, 2024
9b7bd07
block: edit block settings
ScottyPoi Jan 17, 2024
b135df4
edit import
ScottyPoi Jan 17, 2024
654fddd
block: fix examples
ScottyPoi Jan 17, 2024
b98fa0e
block: enable all browser tests
ScottyPoi Jan 17, 2024
03a2709
evm: fix for excluded tests
ScottyPoi Jan 17, 2024
8fcb7cc
Add web-streams polyfill for browser testing
acolytec3 Jan 17, 2024
e5c47c1
Add dep back and fix blockchain test
acolytec3 Jan 17, 2024
dfdce80
delete commented code and console logs
ScottyPoi Jan 18, 2024
c20caea
remove carat from @vitest/browser dependency
ScottyPoi Jan 18, 2024
c47fdae
rebase master / commit package-lock
ScottyPoi Jan 18, 2024
cf17f00
common: remove crypto import from test
ScottyPoi Jan 18, 2024
27b2e87
evm: fix import in customCrypto test
ScottyPoi Jan 18, 2024
91a6870
block: use "type": "module" in package.json
ScottyPoi Jan 18, 2024
146fd07
commit lockfile
ScottyPoi Jan 18, 2024
9e038d3
revert codecov change
ScottyPoi Jan 19, 2024
5a64b30
block: revert package type change
ScottyPoi Jan 19, 2024
781226d
block: rename config to .mts
ScottyPoi Jan 19, 2024
1db4838
blockchain: rename config to .mts
ScottyPoi Jan 19, 2024
4ba44f5
all: rename browser.config to .mts
ScottyPoi Jan 19, 2024
849a065
block: await import of vitest
ScottyPoi Jan 19, 2024
ca1ae5b
config: rename browser config to .mts
ScottyPoi Jan 19, 2024
7af576b
config: make toplevelawait and dynamicImport plugins global
ScottyPoi Jan 19, 2024
3c028e9
deps: add dynamicImport vite plugin
ScottyPoi Jan 19, 2024
fa7f536
config: update imports in config files
ScottyPoi Jan 19, 2024
0fcb942
vitest: update to 1.2.1
ScottyPoi Jan 19, 2024
b665d79
evm: fix import / export type error
ScottyPoi Jan 19, 2024
e60e56b
evm: revert import changes
ScottyPoi Jan 19, 2024
64af3de
evm: revert import changes
ScottyPoi Jan 19, 2024
f2f2630
revert whitespace change
ScottyPoi Jan 19, 2024
d0e7a5f
block: revert change to 4844 example
ScottyPoi Jan 19, 2024
55a0434
evm: delete type change
ScottyPoi Jan 19, 2024
d26fa2f
vitest: only merge config if settings present
ScottyPoi Jan 19, 2024
6851221
client: revert changes to test files
ScottyPoi Jan 20, 2024
bfb5b89
browser: cache during action script
ScottyPoi Jan 20, 2024
933ccf2
revert import change
ScottyPoi Jan 20, 2024
9b7021b
client: revert edit in fullethereumservice.spec.ts
ScottyPoi Jan 20, 2024
1e434ca
add strict-peer-deps flag to browser workflow
ScottyPoi Jan 20, 2024
b049730
workflow: revert cache addition
ScottyPoi Jan 20, 2024
b4d4bae
commit lock changes
ScottyPoi Jan 20, 2024
13a1356
blockchain: rename index.spec.ts to blockchain.spec.ts
ScottyPoi Jan 20, 2024
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
6 changes: 1 addition & 5 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci
- run: npm run install-browser-deps

# Install playwright dependencies
- run: npx playwright install-deps
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this playwright thing removed?

- run: npm ci --include=peer --strict-peer-deps

- run: npm run test:browser -w=@ethereumjs/rlp
- run: npm run test:browser -w=@ethereumjs/util
Expand Down
29 changes: 29 additions & 0 deletions config/vitest.config.browser.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineConfig } from 'vitest/config'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import topLevelAwait from 'vite-plugin-top-level-await'
import dynamicImport from 'vite-plugin-dynamic-import'

const config = defineConfig({
test: {
browser: {
enabled: true,
name: 'chrome',
headless: true,
},
},
resolve: {
alias: {
events: 'eventemitter3',
'node:stream/web': 'web-streams-polyfill/es2018',
},
},
plugins: [
nodePolyfills({
include: ['util', 'fs', 'buffer'],
}),
topLevelAwait(),
dynamicImport()
],
})

export default config
Loading
Loading