Sha256: a8b41a3a3cdd1f2c333a436b400083f03c349c2cb94709ec366992f0caac8e28
Contents?: true
Size: 1.49 KB
Versions: 14
Compression:
Stored size: 1.49 KB
Contents
/* test expect, describe, afterAll, beforeEach */ const { resolve } = require('path') const { chdirWebpackerTestApp } = require('../utils/helpers') const rootPath = process.cwd() chdirWebpackerTestApp() describe('Backward Compatibility - Production environment', () => { afterAll(() => process.chdir(rootPath)) describe('generateWebpackConfig', () => { beforeEach(() => jest.resetModules()) test('should use production config and environment', () => { process.env.RAILS_ENV = 'production' process.env.NODE_ENV = 'production' const { generateWebpackConfig } = require('../index') const webpackConfig = generateWebpackConfig() expect(webpackConfig.output.path).toEqual(resolve('public', 'packs')) expect(webpackConfig.output.publicPath).toEqual('/packs/') expect(webpackConfig).toMatchObject({ devtool: 'source-map', stats: 'normal' }) }) }) describe('globalMutableWebpackConfig', () => { beforeEach(() => jest.resetModules()) test('should use production config and environment', () => { process.env.RAILS_ENV = 'production' process.env.NODE_ENV = 'production' const { globalMutableWebpackConfig: webpackConfig } = require('../index') expect(webpackConfig.output.path).toEqual(resolve('public', 'packs')) expect(webpackConfig.output.publicPath).toEqual('/packs/') expect(webpackConfig).toMatchObject({ devtool: 'source-map', stats: 'normal' }) }) }) })
Version data entries
14 entries across 14 versions & 1 rubygems