tailwindcss/tests/context-reuse.test.js
Robin Malfait e37931ba65
JIT by default - move tests and make them consistent (#5374)
* move `./tests/jit` to `./tests`

* make tests consistent

Abstracted a `run` function and some syntax highlighting helpers for
`html`, `css` and `javascript`.
2021-09-03 13:48:16 +02:00

18 lines
594 B
JavaScript

const path = require('path')
const process = require('child_process')
const { promisify } = require('util')
const exec = promisify(process.exec)
test.skip('a build re-uses the context across multiple files with the same config', async () => {
const filepath = path.resolve(__dirname, './context-reuse.worker.js')
const { stdout } = await exec(`node ${filepath}`)
const results = JSON.parse(stdout.trim())
expect(results[0].activeContexts).toBe(1)
expect(results[1].activeContexts).toBe(1)
expect(results[2].activeContexts).toBe(1)
expect(results[3].activeContexts).toBe(1)
})