2021-12-29 23:51:30 +01:00
|
|
|
import { resolveDebug } from '../src/lib/sharedState'
|
|
|
|
|
|
2024-03-22 17:12:14 +01:00
|
|
|
it.each`
|
|
|
|
|
value | expected
|
|
|
|
|
${'true'} | ${true}
|
|
|
|
|
${'1'} | ${true}
|
|
|
|
|
${'false'} | ${false}
|
|
|
|
|
${'0'} | ${false}
|
|
|
|
|
${'*'} | ${true}
|
|
|
|
|
${'tailwindcss'} | ${true}
|
|
|
|
|
${'tailwindcss:*'} | ${true}
|
|
|
|
|
${'other,tailwindcss'} | ${true}
|
|
|
|
|
${'other,tailwindcss:*'} | ${true}
|
|
|
|
|
${'other,-tailwindcss'} | ${false}
|
|
|
|
|
${'other,-tailwindcss:*'} | ${false}
|
|
|
|
|
${'-tailwindcss'} | ${false}
|
|
|
|
|
${'-tailwindcss:*'} | ${false}
|
|
|
|
|
`('should resolve the debug ($value) flag correctly ($expected)', ({ value, expected }) => {
|
|
|
|
|
expect(resolveDebug(value)).toBe(expected)
|
2021-12-29 23:51:30 +01:00
|
|
|
})
|