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

tests: replace jest with mocha #14054

Merged
merged 128 commits into from
Jun 29, 2022
Merged

tests: replace jest with mocha #14054

merged 128 commits into from
Jun 29, 2022

Conversation

connorjclark
Copy link
Collaborator

Fixes #14047

@connorjclark
Copy link
Collaborator Author

The glob / test filter is not working on Windows (0 tests running), gotta look into that.

@paulirish
Copy link
Member

The debugging workflow needs some love. […]

re: debugging

I've had no issues with debugging, but that's because my new workflow is using vscode's JS Debugger terminal. Give that a shot. It auto attaches to child processes. Is there perhaps a flag to auto attach sub processes when calling node directly?

mkay i'll use the new fancy thing instead.

}

const baseArgs = [
'--require=lighthouse-core/test/test-env/mocha-setup.js',
Copy link
Member

Choose a reason for hiding this comment

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

what about a .mocharc.js file?

is going full CLI flag just easier given the permutations?

Copy link
Collaborator Author

@connorjclark connorjclark Jun 29, 2022

Choose a reason for hiding this comment

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

That file just extracts what you'd pass on the CLI to a file. It doesn't do what jest was doing, which was setting up its own environment for just those particular tests. That's the entire thing run-mocha-tests.js is doing. so in short:

is going full CLI flag just easier given the permutations?

Yeah

@connorjclark
Copy link
Collaborator Author

Windows is surely a dumb mistake in the process execution or paths or something, but I'm wasting way too much time trying to get a windows cloudtop to work at the office. I'll disable for now, and re-enable tomorrow when I'm back home with a windows machine to debug.

#14171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from Jest to Mocha
5 participants