Sha256: 174cabab31481e0c5eefb4fda4eaf5636549f6d52272cfe322cb00e539373be8

Contents?: true

Size: 668 Bytes

Versions: 11

Compression:

Stored size: 668 Bytes

Contents

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

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

chdirTestApp()

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

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

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

      const config = environment.toWebpackConfig()
      expect(config.output.path).toEqual(resolve('public', 'packs-test'))
      expect(config.output.publicPath).toEqual('/packs-test/')
    })
  })
})

Version data entries

11 entries across 11 versions & 2 rubygems

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