Skip to content

Commit

Permalink
organize a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jun 4, 2024
1 parent f1b2fbd commit ed24e4d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/Errors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ const { rejects } = require('node:assert')

const postcssrc = require('../src/index.js')

// FIXME: this is resolving to nearest postcss config (outside root)
// test('Loading Config - {Error}', async () => {
// await rejects(() => postcssrc({}, 'test/err'), {
// message: /^No PostCSS Config found in: (.*)$/
// })
// })

describe('Loading Config - {Error}', () => {
test('no config found error', () => {
// FIXME: this is resolving to nearest postcss config (outside root)
// test('Missing File', async () => {
// await rejects(() => postcssrc({}, 'test/err'), {
// message: /^No PostCSS Config found in: (.*)$/
// })
// })

test('Missing Directory', () => {
return rejects(() => postcssrc({}, 'ghostDir'), {
message: /^No PostCSS Config found in: (.*)$/
})
})

test('TS - Syntax', () => {
return rejects(() => postcssrc({}, 'test/err/ts'), {
message: /^(Transform failed|ParseError)/
})
})
})

describe('Loading Plugins - {Error}', () => {
Expand Down Expand Up @@ -69,9 +75,3 @@ describe('Loading Options - {Error}', () => {
})
})
})

test('Loading TS Config - {Error} - Syntax', () => {
return rejects(() => postcssrc({}, 'test/err/ts'), {
message: /^(Transform failed|ParseError)/
})
})

0 comments on commit ed24e4d

Please sign in to comment.