Skip to content

Modify the failing tests #916

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

Merged
merged 2 commits into from
Aug 6, 2018
Merged

Modify the failing tests #916

merged 2 commits into from
Aug 6, 2018

Conversation

ttanimichi
Copy link
Member

@ttanimichi ttanimichi commented Aug 3, 2018

Closes #892 and #894

415096a

Now we need to set dev_server config to Rails.env.test

Error:
PagesControllerTest#test_it_mounts_components_from_the_dev_server:
RuntimeError: Failed to start dev server
    /home/travis/build/reactjs/react-rails/test/support/webpacker_helpers.rb:65:in `with_dev_server'
    /home/travis/build/reactjs/react-rails/test/react/rails/pages_controller_test.rb:32:in `block (2 levels) in <class:PagesControllerTest>'

Related to https://github.com/rails/webpacker/pull/1179

fa6e8f6

Modify `WebpackerManifestContainerTest`

Failure:
WebpackerManifestContainerTest#test_it_loads_JS_from_the_webpacker_container [/Users/tanimichi.tsukuru/ghq/github.com/reactjs/react-rails/test/react/server_rendering/webpacker_manifest_container_test.rb:20]:
Expected "...(snip)....js.map" to include "ExportDefaultComponent".

Now `webpacker:compile` doesn't contain components' name in the javascript_pack_tags. I think we shouldn't test the contents in `application.js` because it's an implementation detail of webpacker and depending on it makes our tests fragile.

```
Error:
PagesControllerTest#test_it_mounts_components_from_the_dev_server:
RuntimeError: Failed to start dev server
    /home/travis/build/reactjs/react-rails/test/support/webpacker_helpers.rb:65:in `with_dev_server'
    /home/travis/build/reactjs/react-rails/test/react/rails/pages_controller_test.rb:32:in `block (2 levels) in <class:PagesControllerTest>'
```

Related to rails/webpacker#1179
```
Failure:
WebpackerManifestContainerTest#test_it_loads_JS_from_the_webpacker_container [/Users/tanimichi.tsukuru/ghq/github.com/reactjs/react-rails/test/react/server_rendering/webpacker_manifest_container_test.rb:20]:
Expected "...(snip)....js.map" to include "ExportDefaultComponent".
```

Now `webpacker:compile` doesn't contain components' name in the javascript_pack_tags. I think we shouldn't test the contents in `application.js` because it's an implementation detail of webpacker and depending on it makes our tests fragile.
@ttanimichi ttanimichi force-pushed the modify-failing-tests branch from 82db5e5 to fa6e8f6 Compare August 6, 2018 05:00
@ttanimichi ttanimichi changed the title WIP: Modify the failing tests Modify the failing tests Aug 6, 2018
@ttanimichi
Copy link
Member Author

ttanimichi commented Aug 6, 2018

All tests were passed successfully 🎉 cc: @BookOfGreg @suhailnaw

image

image

@ttanimichi ttanimichi merged commit 1549479 into master Aug 6, 2018
@ttanimichi ttanimichi deleted the modify-failing-tests branch August 6, 2018 06:05
@ttanimichi
Copy link
Member Author

@BookOfGreg I've merged this by myself. Feel free to revert them if they aren’t appropriate.

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.

1 participant