Sha256: f6ef511032bfcfbf83b153d3685e98b414ffc6cb76e216f1e2c748cf9d57a25b

Contents?: true

Size: 1013 Bytes

Versions: 67

Compression:

Stored size: 1013 Bytes

Contents

require "test_helper"

class DevServerTest < Webpacker::Test
  def test_running?
    refute Webpacker.dev_server.running?
  end

  def test_host
    with_rails_env("development") do
      assert_equal Webpacker.dev_server.host, "localhost"
    end
  end

  def test_port
    with_rails_env("development") do
      assert_equal Webpacker.dev_server.port, 3035
    end
  end

  def test_https?
    with_rails_env("development") do
      assert_equal Webpacker.dev_server.https?, false
    end
  end

  def test_protocol
    with_rails_env("development") do
      assert_equal Webpacker.dev_server.protocol, "http"
    end
  end

  def test_host_with_port
    with_rails_env("development") do
      assert_equal Webpacker.dev_server.host_with_port, "localhost:3035"
    end
  end

  def test_pretty?
    with_rails_env("development") do
      refute Webpacker.dev_server.pretty?
    end
  end

  def test_default_env_prefix
    assert_equal Webpacker::DevServer::DEFAULT_ENV_PREFIX, "WEBPACKER_DEV_SERVER"
  end
end

Version data entries

67 entries across 67 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/test/dev_server_test.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/test/dev_server_test.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/test/dev_server_test.rb
jetpacker-0.7.0 test/dev_server_test.rb
webpacker-5.4.4 test/dev_server_test.rb
shakapacker-6.5.5 test/dev_server_test.rb
jetpacker-0.6.0 test/dev_server_test.rb
shakapacker-6.5.4 test/dev_server_test.rb
shakapacker-6.5.3 test/dev_server_test.rb
shakapacker-6.5.2 test/dev_server_test.rb
shakapacker-6.5.1 test/dev_server_test.rb
shakapacker-6.5.0 test/dev_server_test.rb
shakapacker-6.4.1 test/dev_server_test.rb
shakapacker-6.4.0 test/dev_server_test.rb
shakapacker-6.3.0 test/dev_server_test.rb
shakapacker-6.3.0.pre.rc.1 test/dev_server_test.rb
shakapacker-6.2.1 test/dev_server_test.rb
shakapacker-6.2.0 test/dev_server_test.rb
shakapacker-6.1.1 test/dev_server_test.rb
shakapacker-6.1.0 test/dev_server_test.rb