Sha256: e952cb2c20ca8d05ddd1e3d6c226b3075f2b5d26b2866739240211a1a002bf99

Contents?: true

Size: 838 Bytes

Versions: 58

Compression:

Stored size: 838 Bytes

Contents

/* test expect, describe, afterAll, beforeEach */

const { resolve } = require('path')
const { chdirTestApp, chdirCwd } = require('../utils/helpers')

chdirTestApp()

describe('Development environment', () => {
  afterAll(chdirCwd)

  describe('toWebpackConfig', () => {
    beforeEach(() => jest.resetModules())

    test('should use development config and environment', () => {
      process.env.RAILS_ENV = 'development'
      process.env.NODE_ENV = 'development'
      const { environment } = require('../index')

      const config = environment.toWebpackConfig()
      expect(config.output.path).toEqual(resolve('public', 'packs'))
      expect(config.output.publicPath).toEqual('/packs/')
      expect(config).toMatchObject({
        devServer: {
          host: 'localhost',
          port: 3035
        }
      })
    })
  })
})

Version data entries

58 entries across 58 versions & 9 rubygems

Version Path
webpacker-4.0.0.rc.5 package/__tests__/development.js
webpacker-4.0.0.rc.4 package/__tests__/development.js
webpacker-4.0.0.rc.3 package/__tests__/development.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/package/__tests__/development.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/package/__tests__/development.js
webpacker-4.0.0.rc.2 package/__tests__/development.js
webpacker-4.0.0.rc.1 package/__tests__/development.js
webpacker-4.0.0.pre.3 package/__tests__/development.js
webpacker-3.5.5 package/__tests__/development.js
webpacker-3.5.3 package/__tests__/development.js
webpacker-3.5.2 package/__tests__/development.js
webpacker-3.5.1 package/__tests__/development.js
webpacker-3.5.0 package/__tests__/development.js
webpacker-3.4.3 package/__tests__/development.js
webpacker-4.0.0.pre.pre.2 package/__tests__/development.js
webpacker-4.0.0.pre.pre.1 package/__tests__/development.js
webpacker-3.4.1 package/__tests__/development.js
webpacker-3.4.0 package/__tests__/development.js