diff --git a/test/options/__snapshots__/config.test.js.snap b/test/options/__snapshots__/config.test.js.snap index 16f6b8fc..86a0e9a7 100644 --- a/test/options/__snapshots__/config.test.js.snap +++ b/test/options/__snapshots__/config.test.js.snap @@ -2,6 +2,8 @@ exports[`Options Config - {Object} 1`] = `"module.exports = \\"a { color: rgba(255, 0, 0, 1.0) }\\\\n\\""`; +exports[`Options Config - Context - {Object} - with ident 1`] = `"module.exports = \\"a { color: rgba(255, 0, 0, 1.0) }\\\\n\\""`; + exports[`Options Config - Context - {Object} 1`] = `"module.exports = \\"a { color: rgba(255, 0, 0, 1.0) }\\\\n\\""`; exports[`Options Config - Path - {String} 1`] = `"module.exports = \\"a { color: black }\\\\n\\""`; diff --git a/test/options/config.test.js b/test/options/config.test.js index 352bac75..78135158 100644 --- a/test/options/config.test.js +++ b/test/options/config.test.js @@ -53,4 +53,26 @@ describe('Options', () => { expect(src).toMatchSnapshot() }) }) + + + test('Config - Context - {Object} - with ident', () => { + const config = { + loader: { + options: { + ident: 'postcss', + config: { + path: 'test/fixtures/config/postcss.config.js', + ctx: { plugin: true } + } + } + } + } + + return webpack('css/index.js', config).then((stats) => { + const src = loader(stats).src + + expect(src).toEqual("module.exports = \"a { color: rgba(255, 0, 0, 1.0) }\\n\"") + expect(src).toMatchSnapshot() + }) + }) })