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

add integration test #169

Merged
merged 1 commit into from
May 1, 2022
Merged

add integration test #169

merged 1 commit into from
May 1, 2022

Conversation

domsew
Copy link

@domsew domsew commented Apr 27, 2022

Hello,

I prepared POC of integration test (due to #26). This test checks if syntax checking works, which proves that monaco-editor works with yaml-language-server as expected (which is the main goal of monaco-yaml). I used playwright. To run test:

  1. npm i
  2. npx playwright install
  3. npm run test
  4. To understand how it works, you can use npx playwright test --config=test/playwright.config.ts --headed

Let me know if you like it and what can be improved.

@netlify
Copy link

netlify bot commented Apr 27, 2022

Deploy Preview for monaco-yaml ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1b67cad
🔍 Latest deploy log https://app.netlify.com/sites/monaco-yaml/deploys/626aa63d04b3330008d79159
😎 Deploy Preview https://deploy-preview-169--monaco-yaml.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Owner

@remcohaszing remcohaszing left a comment

Choose a reason for hiding this comment

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

Thanks! I have wanted to add tests for a long time. This really helps a lot! ❤️

I have some small comments, but overall this looks great!

@remcohaszing
Copy link
Owner

@mhsdesign we may want to add tests for monaco-tailwindcss based on the same setup.

@mhsdesign
Copy link

Thanks for the effort @domsew will look into it

@remcohaszing remcohaszing merged commit 6b6ec18 into remcohaszing:main May 1, 2022
@remcohaszing
Copy link
Owner

I merged it, because it’s already good as-is. I have one follow-up question: Can we get code coverage? I understand this may be complex, given that we build a test project from already bundled sources.

@domsew domsew deleted the add-tests branch May 2, 2022 16:36
@domsew
Copy link
Author

domsew commented May 2, 2022

Can we get code coverage?

I believe it is possible and in fact this is a great idea. Playwright supports chromium built in V8 code coverage link, which is awesome feature. It would require to change test build procedure and choose the best possible reporter (unfortunately there is no default one). Furthermore we need to figure out how to exclude dependency code from the analisis. If I have some time, I'll experiment with it a bit.

@domsew domsew mentioned this pull request Jun 18, 2022
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.

3 participants