mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* Move standalone CLI into main repo * Update release tag * Update workflow * Ignore standalone CLI tests * Fix style * Update changelog [ci skip]
26 lines
683 B
JavaScript
26 lines
683 B
JavaScript
const { execSync } = require('child_process')
|
|
|
|
const platformMap = {
|
|
darwin: 'macos',
|
|
win32: 'windows',
|
|
linux: 'linux',
|
|
}
|
|
|
|
function exec(args) {
|
|
return execSync(
|
|
`./dist/tailwindcss-${platformMap[process.platform]}-${process.arch} ${args}`
|
|
).toString()
|
|
}
|
|
|
|
it('works', () => {
|
|
expect(exec('--content tests/fixtures/basic.html')).toContain('.uppercase')
|
|
})
|
|
|
|
it('supports first-party plugins', () => {
|
|
let result = exec('--content tests/fixtures/plugins.html --config tests/fixtures/test.config.js')
|
|
expect(result).toContain('.aspect-w-1')
|
|
expect(result).toContain('.form-input')
|
|
expect(result).toContain('.line-clamp-2')
|
|
expect(result).toContain('.prose')
|
|
})
|