Skip to content

Commit

Permalink
docgen: Replace fixtures with inline parsed code. (#40428)
Browse files Browse the repository at this point in the history
Previously in the `docgen` package test suite we relied on developers manually creating
a set of files for each test that includes a reference snippet of code, a parsed AST,
and an exports listing. These files weren't linked together in any way.

In this patch we're removing the manual steps and inlining the code snippets inside each
test in the suite. This removes a level of manual work and indirection when maintaining
the tests while leaning more on `docgen`'s `engine` component, which itself does the
actual parsing.
  • Loading branch information
dmsnell authored Apr 20, 2022
1 parent 411fdd0 commit d292369
Show file tree
Hide file tree
Showing 117 changed files with 1,328 additions and 11,005 deletions.
4 changes: 0 additions & 4 deletions packages/docgen/test/fixtures/default-class-anonymous/code.js

This file was deleted.

70 changes: 0 additions & 70 deletions packages/docgen/test/fixtures/default-class-anonymous/exports.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/docgen/test/fixtures/default-class-named/code.js

This file was deleted.

86 changes: 0 additions & 86 deletions packages/docgen/test/fixtures/default-class-named/exports.json

This file was deleted.

This file was deleted.

This file was deleted.

127 changes: 0 additions & 127 deletions packages/docgen/test/fixtures/default-function-named/ast.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/docgen/test/fixtures/default-function-named/code.js

This file was deleted.

Loading

0 comments on commit d292369

Please sign in to comment.