-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.test.js
More file actions
17 lines (13 loc) 路 808 Bytes
/
Copy pathindex.test.js
File metadata and controls
17 lines (13 loc) 路 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const postcss = require('postcss')
const plugin = require('./')
async function run (input, output, opts = { }) {
let result = await postcss([plugin(opts)]).process(input, { from: undefined })
expect(result.css).toEqual(output)
expect(result.warnings()).toHaveLength(0)
}
it('Should transate properties and values to khaleesi meme language', async () => {
await run(`.foo{border-radius: 50%;color: red;background-color: white!important;}`, '.foo{birdir-ridiis: 50%;cilir: rid;bickgriind-cilir: whiti!important;}', { dracarys: false })
})
it('Should add 馃敟 in !important when dracarys option is sended', async () => {
await run(`.foo{border-radius: 50%;color: red;background-color: white!important;}`, '.foo{birdir-ridiis: 50%;cilir: rid;bickgriind-cilir: whiti!馃敟;}', { dracarys: true })
})