diff --git a/tests/dark-mode.test.js b/tests/dark-mode.test.js index 47a5aaef3..3e010c6b0 100644 --- a/tests/dark-mode.test.js +++ b/tests/dark-mode.test.js @@ -23,6 +23,29 @@ it('should be possible to use the darkMode "class" mode', () => { }) }) +it('should be possible to change default class with darkMode "class" mode', () => { + let config = { + darkMode: 'class', + darkModeClassName: '.test-dark', + content: [{ raw: html`
` }], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind base; + @tailwind components; + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .test-dark .dark\\:font-bold { + font-weight: 700; + } + `) + }) +}) + it('should be possible to use the darkMode "media" mode', () => { let config = { darkMode: 'media',