4656f52d15
* CSS Support Customization * Sort imports * Correct PostCSS plugin loading * Add css customization test * Test "bad" css configuration * Add load config test * adjust spacing * adjust spacing 2x * Only allow config through JSON * Support excluding false plugins * Test tailwind css behavior * Test plugin exclusion * Fix unit test * Fix config file * Remove more variants * Update test cases
28 lines
762 B
JavaScript
28 lines
762 B
JavaScript
/* eslint-env jest */
|
|
import { findConfig } from 'next/dist/lib/find-config'
|
|
import { join } from 'path'
|
|
|
|
const fixtureDir = join(__dirname, 'fixtures')
|
|
|
|
describe('find config', () => {
|
|
it('should resolve rc.json', async () => {
|
|
const config = await findConfig(join(fixtureDir, 'config-json'), 'test')
|
|
expect(config).toEqual({ foo: 'bar' })
|
|
})
|
|
|
|
it('should resolve package.json', async () => {
|
|
const config = await findConfig(
|
|
join(fixtureDir, 'config-package-json'),
|
|
'test'
|
|
)
|
|
expect(config).toEqual({ foo: 'bar' })
|
|
})
|
|
|
|
it('should resolve down', async () => {
|
|
const config = await findConfig(
|
|
join(fixtureDir, 'config-down/one/two/three/'),
|
|
'test'
|
|
)
|
|
expect(config).toEqual({ foo: 'bar' })
|
|
})
|
|
})
|