Skip to content

Commit b471230

Browse files
committed
test: Only run parse once in fixture test
1 parent 2314649 commit b471230

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/__tests__/main-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ describe('main', () => {
230230
const fileContent = fs.readFileSync(path.join(fixturePath, fileNames[i]));
231231

232232
it(`processes component "${fileNames[i]}" without errors`, () => {
233-
expect(() => docgen.parse(fileContent)).not.toThrowError();
234-
expect(docgen.parse(fileContent)).toMatchSnapshot();
233+
let result;
234+
expect(() => {
235+
result = docgen.parse(fileContent);
236+
}).not.toThrowError();
237+
expect(result).toMatchSnapshot();
235238
});
236239
}
237240
});

0 commit comments

Comments
 (0)