tailwindcss/tests/raw-content.test.js
Adam Wathan 9e34619dd6
Add logical properties support for inline direction (#10166)
* ensure we use `npm@7` for older versions of Node.js

This is important so that we can guarantee that `workspaces` are
supported which we depend on right now (just for install purposes).

* tmp: trigger CI build (GitHub is doing funky things and not working right now)

* drop Node.js 12 from Node.js CI workflow

* focus on Node.js 16 for now

* Revert "tmp: trigger CI build (GitHub is doing funky things and not working right now)"

This reverts commit a3deed472da498f8a52404b2e8ccbc16f0e93101.

* WIP

* Add support for logical properties in inline direction

* Add scroll-margin/scroll-padding utilities

* Update CHANGELOG

* Rename inset-s/e to start/end

* Update sort order in test

* Use logical properties for space/divide in Oxide

* run non-oxide and OXIDE tests

+ fix oxide version tests

* drop oxide specific test job

The normal `npm run test` will already include the non-oxide and oxide
version when running tests.

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-01-16 18:57:42 +01:00

27 lines
713 B
JavaScript

import fs from 'fs'
import path from 'path'
import { run, css } from './util/run'
import { env } from '../src/lib/sharedState'
it('raw content', () => {
let config = {
content: [{ raw: fs.readFileSync(path.resolve(__dirname, './raw-content.test.html'), 'utf8') }],
corePlugins: { preflight: false },
}
let input = css`
@tailwind components;
@tailwind utilities;
`
return run(input, config).then((result) => {
let expectedPath = env.OXIDE
? path.resolve(__dirname, './raw-content.oxide.test.css')
: path.resolve(__dirname, './raw-content.test.css')
let expected = fs.readFileSync(expectedPath, 'utf8')
expect(result.css).toMatchFormattedCss(expected)
})
})