Skip to content

Commit

Permalink
Fix the failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
illright committed Jun 13, 2024
1 parent ded8bd3 commit b8bdd51
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions packages/steiger-plugin-fsd/src/public-api/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,6 @@ it('reports errors on segments that are missing a public API', () => {

const diagnostics = publicApi.check(root, { sourceFileExtension: 'ts' }).diagnostics.sort(compareMessages)
expect(diagnostics).toEqual([
{
message: 'On the "app" layer, segment "providers" is missing a public API.',
fixes: [
{
type: 'create-file',
path: '/app/providers/index.ts',
content: '',
},
],
},
{
message: 'On the "app" layer, segment "styles" is missing a public API.',
fixes: [
{
type: 'create-file',
path: '/app/styles/index.ts',
content: '',
},
],
},
{
message: 'On the "shared" layer, segment "ui" is missing a public API.',
fixes: [
Expand All @@ -130,31 +110,3 @@ it('reports errors on segments that are missing a public API', () => {
},
])
})

it('reports no errors when the App layer is missing a public API', () => {
const root = parseIntoFsdRoot(`
📂 shared
📂 ui
📄 index.ts
📂 entities
📂 users
📂 ui
📄 index.ts
📂 posts
📂 ui
📄 index.ts
📂 features
📂 comments
📂 ui
📄 index.ts
📂 pages
📂 editor
📂 ui
📄 index.ts
📂 app
📂 providers
📂 styles
`)

expect(publicApi.check(root, { sourceFileExtension: 'ts' })).toEqual({ diagnostics: [] })
})

0 comments on commit b8bdd51

Please sign in to comment.