Skip to content

Commit f33131c

Browse files
solcikmichael-ciniawsky
authored andcommitted
test: filter ident (options.ident) (#314)
1 parent 31a25e8 commit f33131c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

test/options/__snapshots__/config.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
exports[`Options Config - {Object} 1`] = `"module.exports = \\"a { color: rgba(255, 0, 0, 1.0) }\\\\n\\""`;
44

5+
exports[`Options Config - Context - {Object} - with ident 1`] = `"module.exports = \\"a { color: rgba(255, 0, 0, 1.0) }\\\\n\\""`;
6+
57
exports[`Options Config - Context - {Object} 1`] = `"module.exports = \\"a { color: rgba(255, 0, 0, 1.0) }\\\\n\\""`;
68

79
exports[`Options Config - Path - {String} 1`] = `"module.exports = \\"a { color: black }\\\\n\\""`;

test/options/config.test.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,26 @@ describe('Options', () => {
5353
expect(src).toMatchSnapshot()
5454
})
5555
})
56+
57+
58+
test('Config - Context - {Object} - with ident', () => {
59+
const config = {
60+
loader: {
61+
options: {
62+
ident: 'postcss',
63+
config: {
64+
path: 'test/fixtures/config/postcss.config.js',
65+
ctx: { plugin: true }
66+
}
67+
}
68+
}
69+
}
70+
71+
return webpack('css/index.js', config).then((stats) => {
72+
const src = loader(stats).src
73+
74+
expect(src).toEqual("module.exports = \"a { color: rgba(255, 0, 0, 1.0) }\\n\"")
75+
expect(src).toMatchSnapshot()
76+
})
77+
})
5678
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy