Sha256: a31d24e304440628a9a9bfa299e9c4f2e4aa53ee315a9f94f9a2b78e196ecdcb

Contents?: true

Size: 826 Bytes

Versions: 66

Compression:

Stored size: 826 Bytes

Contents

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

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

chdirTestApp()

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

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

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

      const { environment } = require('../index')
      const config = environment.toWebpackConfig()

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

Version data entries

66 entries across 65 versions & 12 rubygems

Version Path
jetpacker-0.4.1 package/__tests__/staging.js
jetpacker-0.4.0 package/__tests__/staging.js
jetpacker-0.3.0 package/__tests__/staging.js
jetpacker-0.2.0 package/__tests__/staging.js
webpacker-4.2.2 package/__tests__/staging.js
webpacker-4.2.1 package/__tests__/staging.js
webpacker-4.2.0 package/__tests__/staging.js
webpacker-4.1.0 package/__tests__/staging.js
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/package/__tests__/staging.js
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/package/__tests__/staging.js
jester-data-8.0.0 node_modules/@rails/webpacker/package/__tests__/staging.js
ezii-os-5.2.1 node_modules/@rails/webpacker/package/__tests__/staging.js
ezii-os-2.0.1 node_modules/@rails/webpacker/package/__tests__/staging.js
ezii-os-1.1.0 node_modules/@rails/webpacker/package/__tests__/staging.js
ezii-os-1.0.0 node_modules/@rails/webpacker/package/__tests__/staging.js
ezii-os-0.0.0.1.0 node_modules/@rails/webpacker/package/__tests__/staging.js
ezii-os-0.0.0.0.1 node_modules/@rails/webpacker/package/__tests__/staging.js
webpacker-4.0.7 package/__tests__/staging.js
webpacker-4.0.6 package/__tests__/staging.js
webpacker-4.0.5 package/__tests__/staging.js