Sha256: 8125ebe8b30283595439136cc3bbaacd7e2217687d6e3ba9785be020079e1243

Contents?: true

Size: 897 Bytes

Versions: 14

Compression:

Stored size: 897 Bytes

Contents

/* global test expect, describe */
const { resolve } = require('path')
const { chdirWebpackerTestApp, resetEnv } = require('../utils/helpers')

const rootPath = process.cwd()
chdirWebpackerTestApp()

const config = require('../config')

describe('Backward Compatibility - Config', () => { 
  beforeEach(() => jest.resetModules() && resetEnv())
  afterAll(() => process.chdir(rootPath))

  test('x public path with asset host', () => {
    process.env.RAILS_ENV = 'development'
    process.env.WEBPACKER_ASSET_HOST = 'http://foo.com/'
    const config = require('../config')

    expect(config.publicPath).toEqual('http://foo.com/packs/')
  })

  test('x should allow overriding manifestPath', () => {
    process.env.WEBPACKER_CONFIG = 'config/webpacker_manifest_path.yml'
    const config = require('../config')
    expect(config.manifestPath).toEqual(resolve('app/packs/manifest.json'))
  })
})

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shakapacker-7.2.3 package/__tests__/config-bc.js
shakapacker-7.3.0.beta.1 package/__tests__/config-bc.js
shakapacker-7.2.2 package/__tests__/config-bc.js
shakapacker-7.2.1 package/__tests__/config-bc.js
shakapacker-7.2.0 package/__tests__/config-bc.js
shakapacker-7.2.0.rc.0 package/__tests__/config-bc.js
shakapacker-7.1.0 package/__tests__/config-bc.js
shakapacker-7.0.3 package/__tests__/config-bc.js
shakapacker-7.0.2 package/__tests__/config-bc.js
shakapacker-7.0.1 package/__tests__/config-bc.js
shakapacker-7.0.0 package/__tests__/config-bc.js
shakapacker-7.0.0.rc.2 package/__tests__/config-bc.js
shakapacker-7.0.0.rc.1 package/__tests__/config-bc.js
shakapacker-7.0.0.rc.0 package/__tests__/config-bc.js