mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
test: add additional tests for convertInlineStyleToMap
This test if the code leaved custom css properties be. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
82e7f439c8
commit
6d0d7c31ff
1 changed files with 12 additions and 0 deletions
|
@ -26,4 +26,16 @@ describe('convertInlineStyleToMap', () => {
|
|||
expect(Object.keys(styleObject)).toHaveLength(1)
|
||||
expect(styleObject.content).toEqual('\\;')
|
||||
})
|
||||
it('should respect css custom properties', () => {
|
||||
const styleObject = convertInlineStyleToMap('--test: okay;')
|
||||
expect(Object.keys(styleObject)).toHaveLength(1)
|
||||
expect(styleObject['--test']).toEqual('okay')
|
||||
})
|
||||
it('should transform -ms css properties', () => {
|
||||
const styleObject = convertInlineStyleToMap(
|
||||
'-ms-overflow-style: ms-autohiding-scrollbar'
|
||||
)
|
||||
expect(Object.keys(styleObject)).toHaveLength(1)
|
||||
expect(styleObject['msOverflowStyle']).toEqual('ms-autohiding-scrollbar')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue