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

chore(v2): Implement a simple E2E testing mechanism for docusausus start #2950

Merged
merged 4 commits into from
Jun 22, 2020
Merged

chore(v2): Implement a simple E2E testing mechanism for docusausus start #2950

merged 4 commits into from
Jun 22, 2020

Conversation

SamChou19815
Copy link
Contributor

@SamChou19815 SamChou19815 commented Jun 17, 2020

Motivation

Implement a simple mechanism to E2E test docusausus start, so that we can catch no-prod only issues at diff time (avoid things like #2944). It uses the done webpack compiler hook to ensure that webpack can compile without errors. In this way, we can completely rule out disasters like #2883.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Run E2E_TEST yarn start --no-open on the following scanarios:

  1. Pass with no issues

pass

  1. Fail when we have a bad client module.

fail-bad-module

  1. Fail when we have some client syntax errors.

fail-syntax-error

  1. Fail if we cannot load plugin from docusaurus.config.js

fail-bad-plugin

  1. Fail if we cannot load plugin from preset.

fail-bad-preset-plugin

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 17, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jun 17, 2020

Deploy preview for docusaurus-2 ready!

Built with commit e78f830

https://deploy-preview-2950--docusaurus-2.netlify.app

@SamChou19815 SamChou19815 marked this pull request as ready for review June 17, 2020 01:32
@SamChou19815
Copy link
Contributor Author

SamChou19815 commented Jun 17, 2020

Looks like the new integration test is already catching some problems. See https://github.com/facebook/docusaurus/pull/2950/checks?check_run_id=778802180. #2884 introduced some nullish coalescing syntax that the current babel loader doesn't like.

@slorber
Copy link
Collaborator

slorber commented Jun 17, 2020

LGTM

Hey, wasn't aware of this "test-website" e2e tests.

Wonder if it's not worth it to do the same for the bootstrap theme as well? @fanny

@fanny
Copy link
Contributor

fanny commented Jun 20, 2020

Interesting, I think that would be great, I'll work on

@slorber slorber merged commit 592dca9 into facebook:master Jun 22, 2020
@SamChou19815 SamChou19815 deleted the docusaurus-start-integration-test branch June 22, 2020 16:07
@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants