Module: Webpack::Testing::Helper

Defined in:
lib/webpack/testing/helper.rb

Instance Method Summary collapse

Instance Method Details

#mock_dev_server(root_path) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/webpack/testing/helper.rb', line 10

def mock_dev_server(root_path)
  Webpack::DevServer.stub :config, Webpack::DevServer::Configuration.new do
    Webpack::Manifest.stub :config, Webpack::Manifest::Configuration.new do
      Webpack::Testing::FileServer.new(root_path).run do |srv|
        yield srv
      end
    end
  end
end