Sha256: 074dbbd6ea945ab22c52db07ad838ecb83adc35ae022beb1c0649edcf811088c

Contents?: true

Size: 812 Bytes

Versions: 40

Compression:

Stored size: 812 Bytes

Contents

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

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

chdirTestApp()

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

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

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

      const { webpackConfig } = require('../index')

      expect(webpackConfig.output.path).toEqual(
        resolve('public', 'packs-staging')
      )
      expect(webpackConfig.output.publicPath).toEqual('/packs-staging/')
      expect(webpackConfig).toMatchObject({
        devtool: 'source-map',
        stats: 'normal'
      })
    })
  })
})

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
shakapacker-6.6.0 package/__tests__/staging.js
shakapacker-6.5.6 package/__tests__/staging.js
shakapacker-6.5.5 package/__tests__/staging.js
shakapacker-6.5.4 package/__tests__/staging.js
shakapacker-6.5.3 package/__tests__/staging.js
shakapacker-6.5.2 package/__tests__/staging.js
shakapacker-6.5.1 package/__tests__/staging.js
shakapacker-6.5.0 package/__tests__/staging.js
shakapacker-6.4.1 package/__tests__/staging.js
shakapacker-6.4.0 package/__tests__/staging.js
shakapacker-6.3.0 package/__tests__/staging.js
shakapacker-6.3.0.pre.rc.1 package/__tests__/staging.js
shakapacker-6.2.1 package/__tests__/staging.js
shakapacker-6.2.0 package/__tests__/staging.js
shakapacker-6.1.1 package/__tests__/staging.js
shakapacker-6.1.0 package/__tests__/staging.js
shakapacker-6.1.0.beta.0 package/__tests__/staging.js
shakapacker-6.0.2 package/__tests__/staging.js
shakapacker-6.0.1 package/__tests__/staging.js
shakapacker-6.0.0 package/__tests__/staging.js