Sha256: 78f123bd77d626b0059049c9bb9983d866b18d353fed603d4c8dcf045c4d2698

Contents?: true

Size: 809 Bytes

Versions: 66

Compression:

Stored size: 809 Bytes

Contents

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

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

chdirTestApp()

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

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

    test('should use production config and environment', () => {
      process.env.RAILS_ENV = 'production'
      process.env.NODE_ENV = 'production'

      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({
        devtool: 'source-map',
        stats: 'normal'
      })
    })
  })
})

Version data entries

66 entries across 65 versions & 12 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/__tests__/production.js
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/__tests__/production.js
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/__tests__/production.js
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
jetpacker-0.7.0 package/__tests__/production.js
webpacker-5.4.4 package/__tests__/production.js
jetpacker-0.6.0 package/__tests__/production.js
disco_app-0.18.0 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.18.2 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.16.1 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.15.2 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.18.4 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.18.1 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.14.0 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/__tests__/production.js
webpacker-5.4.3 package/__tests__/production.js
webpacker-5.4.2 package/__tests__/production.js
webpacker-5.4.1 package/__tests__/production.js
webpacker-5.4.0 package/__tests__/production.js