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

refactor(test): enhance mocha usability #3445

Merged
merged 8 commits into from Aug 31, 2021

Conversation

daiyam
Copy link
Contributor

@daiyam daiyam commented Aug 31, 2021

This PR is:

  • adding the command test:dev to be able to run an unique test or set of tests (yarn test:dev -g="Color channels")
  • adding the support of Mocha Test Explorer in Visual Studio Code

The dependency source-map-support is used by mocha to reference back to the typescript source file (not the compiled javascript file) when there is an error.

@Tyriar as discussed in #3434

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2021

Is there a trick to getting this to work? I checked out this branch, ran yarn, installed the extension and see this:

image

Refreshing loads for a bit and shows the same.

@daiyam
Copy link
Contributor Author

daiyam commented Aug 31, 2021

Here I'm getting:
Screen Shot 2021-08-31 at 2 51 53 PM

The updating settings.json is required. Without it, I'm don't get anything.
You might also need to click on the reload arrow.

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2021

🤷

image

@daiyam
Copy link
Contributor Author

daiyam commented Aug 31, 2021

Oh! Let's me try in Insiders...

@daiyam
Copy link
Contributor Author

daiyam commented Aug 31, 2021

Yep. I can't get the tests to load on Windows... not sure why.

@daiyam
Copy link
Contributor Author

daiyam commented Aug 31, 2021

Oh! Even test:dev doesn't work on Windows...

package.json Outdated Show resolved Hide resolved
@daiyam
Copy link
Contributor Author

daiyam commented Aug 31, 2021

@Tyriar Can you retest the Mocha Explorer? You might need to reload VSCode...

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2021

Still doesn't seem to work, even after a full clean and re-running yarn/restarting vscode

@daiyam
Copy link
Contributor Author

daiyam commented Aug 31, 2021

Not sure why.. I've tested on Windows with the Insiders version
Screen Shot 2021-08-31 at 4 32 07 PM

Do you have any global settings for Mocha Test Explorer or Test Explorer?

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2021

Doh, had "testExplorer.useNativeTesting": true since it asked that was the issue. Guess it's not ready yet. Seems to be working now

package.json Outdated Show resolved Hide resolved
.vscode/settings.json Outdated Show resolved Hide resolved
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@Tyriar Tyriar enabled auto-merge August 31, 2021 15:32
@Tyriar Tyriar disabled auto-merge August 31, 2021 19:10
@Tyriar Tyriar merged commit 52d00a4 into xtermjs:master Aug 31, 2021
@daiyam daiyam deleted the refactor-better-mocha branch August 31, 2021 20:12
@Tyriar Tyriar added this to the 4.14.0 milestone Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants