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

feat: add tests for Index and build pages script #3044

Merged
merged 35 commits into from
Jul 9, 2024

Conversation

vishvamsinh28
Copy link
Contributor

This PR adds test for index.js and build-pages.js scripts

Copy link

netlify bot commented Jun 17, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8b793ad
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/668d4e3ed83879000894c8ab
😎 Deploy Preview https://deploy-preview-3044--asyncapi-website.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 configuration.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Jun 17, 2024

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 52
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🟠 PWA 56

Lighthouse ran on https://deploy-preview-3044--asyncapi-website.netlify.app/

@anshgoyalevil anshgoyalevil added the gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code label Jul 1, 2024
Comment on lines +25 to +27
fs.mkdirSync(TEST_DIR, { recursive: true });
fs.mkdirSync(SRC_DIR, { recursive: true });
fs.mkdirSync(TARGET_DIR, { recursive: true });
Copy link
Member

Choose a reason for hiding this comment

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

fs module works in CI and locally in tests, then why have you mocked all those function calls in previous test PRs?

Copy link
Member

Choose a reason for hiding this comment

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

These tests seems to be perfect. Why haven't you used the actual fs module in previous PRs? Any specific reason?

@vishvamsinh28
Copy link
Contributor Author

I felt like mocking was a better approach for them, but with this script, I thought using the actual fs module would be better. I also did it to experiment with the actual fs module, and it worked well. 😅

But as you commented on other PRs i will update tests for them as well and use fs module without mocking it

@anshgoyalevil

Copy link
Member

@anshgoyalevil anshgoyalevil left a comment

Choose a reason for hiding this comment

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

LGTM

@anshgoyalevil
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit cf5f24a into asyncapi:master Jul 9, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc This label should be used for issues or discussions related to ideas for Google Summer of Code ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants