Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c579078

Browse files
committed
fix: don't snapshot known bad jsx tests
1 parent e74d2e8 commit c579078

File tree

3,228 files changed

+5
-716270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,228 files changed

+5
-716270
lines changed

packages/parser/tests/lib/jsx.test.ts

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/embedded-tags/__snapshots__/withLocationInfo.test.ts.snap

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/embedded-tags/withLocationInfo.test.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/invalid-namespace-value-with-dots/__snapshots__/withLocationInfo.test.ts.snap

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/invalid-namespace-value-with-dots/withLocationInfo.test.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/namespaced-attribute-and-value-inserted/__snapshots__/withLocationInfo.test.ts.snap

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/namespaced-attribute-and-value-inserted/withLocationInfo.test.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/namespaced-name-and-attribute/__snapshots__/withLocationInfo.test.ts.snap

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/parser/tests/shared-fixtures/generated/jsx/namespaced-name-and-attribute/withLocationInfo.test.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/shared-fixtures/jsx-known-issues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ export default [
77
'jsx/namespaced-attribute-and-value-inserted', // https://github.com/Microsoft/TypeScript/issues/7411
88
'jsx/namespaced-name-and-attribute', // https://github.com/Microsoft/TypeScript/issues/7411
99
'jsx/invalid-namespace-value-with-dots', // https://github.com/Microsoft/TypeScript/issues/7411
10-
];
10+
].map(f => `${f}.src.js`);

packages/shared-fixtures/tools/generate-tests.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import fs from 'fs';
22
import mkdirp from 'mkdirp';
33
import path from 'path';
4+
import jsxKnownIssues from '../jsx-known-issues';
45

56
function main(): void {
67
const fixtureFolder = 'fixtures';
@@ -16,7 +17,9 @@ function main(): void {
1617
const fileOrSubGroupPath = path.join(groupFolder, fileOrSubGroupName);
1718
if (fs.statSync(fileOrSubGroupPath).isDirectory()) {
1819
handleGroup(fileOrSubGroupPath);
19-
} else {
20+
} else if (
21+
!jsxKnownIssues.some(jsxName => fileOrSubGroupPath.endsWith(jsxName))
22+
) {
2023
createTest(fileOrSubGroupPath, 'typescript-estree');
2124
createTest(fileOrSubGroupPath, 'parser');
2225
}

0 commit comments

Comments
 (0)