Sha256: 2d3b04930593d36e996e1234a6687ed3cedc282338f164bdcc815ec2a9145f44

Contents?: true

Size: 724 Bytes

Versions: 7

Compression:

Stored size: 724 Bytes

Contents

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

describe('index', () => {
  test('exports webpack-merge v5 functions', () => {
    expect(index.merge).toBeInstanceOf(Function)
    expect(index.mergeWithRules).toBeInstanceOf(Function)
    expect(index.mergeWithCustomize).toBeInstanceOf(Function)
  })

  test('webpackConfig returns an immutable object', () => {
    const { generateWebpackConfig } = require('../index')

    const webpackConfig1 = generateWebpackConfig()
    const webpackConfig2 = generateWebpackConfig()

    webpackConfig1.newKey = 'new value'
    webpackConfig1.output.path = 'new path'

    expect(webpackConfig2).not.toHaveProperty('newKey')
    expect(webpackConfig2.output.path).not.toEqual('new value')
  })
})

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
shakapacker-7.0.3 package/__tests__/index.js
shakapacker-7.0.2 package/__tests__/index.js
shakapacker-7.0.1 package/__tests__/index.js
shakapacker-7.0.0 package/__tests__/index.js
shakapacker-7.0.0.rc.2 package/__tests__/index.js
shakapacker-7.0.0.rc.1 package/__tests__/index.js
shakapacker-7.0.0.rc.0 package/__tests__/index.js