Skip to content

Commit

Permalink
feat(react-conformance): Deprecate conformance test `consistent-callb…
Browse files Browse the repository at this point in the history
…ack-args` (#30301)
  • Loading branch information
YuanboXue-Amber authored Feb 7, 2024
1 parent ba59525 commit d9a7739
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Deprecate consistent-callback-args test",
"packageName": "@fluentui/react-conformance",
"email": "[email protected]",
"dependentChangeType": "patch"
}
5 changes: 4 additions & 1 deletion packages/react-conformance/src/defaultTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@ export const defaultTests: DefaultTestObject = {
});
},

/** Ensures that components have consistent callback arguments (ev, data) */
/**
* Ensures that components have consistent callback arguments (ev, data)
* @deprecated this test is for existing callbacks. The newly added callbacks' type will be guarded by eslint rule consistent-callback-type
*/
'consistent-callback-args': (testInfo, componentInfo, tsProgram) => {
it('has consistent custom callback arguments (consistent-callback-args)', () => {
const { testOptions = {} } = testInfo;
Expand Down
3 changes: 3 additions & 0 deletions packages/react-conformance/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ export interface DefaultTestObject<TProps = {}> {
'has-top-level-file': BaseConformanceTest<TProps>;
'kebab-aria-attributes': ConformanceTest<TProps>;
'consistent-callback-names': ConformanceTest<TProps>;
/**
* @deprecated this test is for existing callbacks. The newly added callbacks' type will be guarded by eslint rule consistent-callback-type
*/
'consistent-callback-args': ConformanceTest<TProps>;
'primary-slot-gets-native-props': BaseConformanceTest<TProps>;
}

0 comments on commit d9a7739

Please sign in to comment.