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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/dummy_webpacker3/config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ test:
<<: *default
compile: true

dev_server:
host: localhost
port: 8080
hmr: false
https: false

production:
<<: *default

Expand Down
12 changes: 2 additions & 10 deletions test/react/server_rendering/webpacker_manifest_container_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@ class WebpackerManifestContainerTest < ActiveSupport::TestCase
def test_it_loads_JS_from_the_webpacker_container
WebpackerHelpers.compile
container = React::ServerRendering::WebpackerManifestContainer.new
js_file = container.find_asset('application.js')
# Main file:
assert_includes js_file, 'ReactRailsUJS'
# Bundled dependencies:
assert_includes js_file, 'ExportDefaultComponent'
assert_not_empty container.find_asset('application.js')
end

def test_it_loads_from_webpack_dev_server
WebpackerHelpers.with_dev_server do
container = React::ServerRendering::WebpackerManifestContainer.new
js_file = container.find_asset('application.js')
# Main file:
assert_includes js_file, 'ReactRailsUJS'
# Bundled dependencies:
assert_includes js_file, 'ExportDefaultComponent'
assert_not_empty container.find_asset('application.js')
end
end
end
Expand Down