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

test(command-dev): replace cra test with eleventy test #2171

Merged
merged 1 commit into from
Apr 19, 2021
Merged

Conversation

erezrokah
Copy link
Contributor

@erezrokah erezrokah commented Apr 19, 2021

- Summary

Replaces the create-react-app site in our tests with an eleventy site.
In order to run the cra test we npm ci the site's dependencies. This takes about 25 seconds on my machine.
npm ci on the eleventy site takes about 4 seconds.

- Test plan

See test.

I had to skip one test due to #1242 which I'll fix in a separate PR.

Screenshots on the Windows CI machine:
image
image

- A picture of a cute animal (not mandatory but encouraged)
image

@erezrokah erezrokah requested a review from a team as a code owner April 19, 2021 17:23
@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Apr 19, 2021
@@ -1,4 +1,4 @@
/force.html /test.html 200!
/something /otherthing.html
/force /test 200!
Copy link
Contributor Author

@erezrokah erezrokah Apr 19, 2021

Choose a reason for hiding this comment

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

eleventy puts files in their own directories (e.g. test.html is copied to test/index.html)

@github-actions
Copy link

github-actions bot commented Apr 19, 2021

📊 Benchmark results

Comparing with d74d294

  • Package size: 394 MB

t.true(response.includes('Web site created using create-react-app'))
})

test('static/js/bundle.js', async (t) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is removed as it is no longer required


const BUNDLE_MIN_LENGTH = 1e2

test('static file under public/', async (t) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also removed as it is no longer required

t.is(body, 'Redirecting to /otherthing.html')
})

test('normal rewrite', async (t) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is skipped per #1242

})

test('force rewrite', async (t) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This changed from getting force.html to force

})

test('robots.txt', async (t) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed as no longer required

@erezrokah erezrokah merged commit b01ccc5 into main Apr 19, 2021
@erezrokah erezrokah deleted the test/cra_test branch April 19, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants