Sha256: 2907db6c9174e0525ab515baa2735fdc27507ddc1fecb6d6a6321597c3a05f9a
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
const { resolve } = require("path") const { chdirTestApp } = require("../helpers") const rootPath = process.cwd() chdirTestApp() jest.mock("../../package/utils/helpers", () => { const original = jest.requireActual("../../package/utils/helpers") const moduleExists = () => false return { ...original, moduleExists } }) describe("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("../../package/index") const webpackConfig = generateWebpackConfig() expect(webpackConfig.output.path).toStrictEqual( resolve("public", "packs") ) expect(webpackConfig.output.publicPath).toBe("/packs/") expect(webpackConfig).toMatchObject({ devtool: "source-map", stats: "normal" }) }) }) })
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shakapacker-8.1.0 | test/package/production.test.js |
shakapacker-8.0.2 | test/package/production.test.js |