File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -1896,6 +1896,44 @@ const typescriptTests = {
1896
1896
} ,
1897
1897
errors : 1 ,
1898
1898
} ,
1899
+
1900
+ // `groups` – real-world example from issue #61 based on:
1901
+ // https://github.com/polkadot-js/apps/blob/074b245a725873f7c3c16fc83b80fb9c02351a65/packages/apps/src/Endpoints/Group.tsx
1902
+ // https://github.com/polkadot-js/apps/blob/074b245a725873f7c3c16fc83b80fb9c02351a65/.eslintrc.js#L31-L39
1903
+ {
1904
+ options : [
1905
+ {
1906
+ groups : [
1907
+ [ "^[^@.].*\\u0000$" , "^[^/.]" ] ,
1908
+ [ "^@polkadot.*\\u0000$" , "^@polkadot" ] ,
1909
+ [ "^\\..*\\u0000$" , "^\\." ] ,
1910
+ ] ,
1911
+ } ,
1912
+ ] ,
1913
+ code : input `
1914
+ |import React, { useCallback } from 'react';
1915
+ |import styled from 'styled-components';
1916
+ |
1917
+ |import { Icon } from '@polkadot/react-components';
1918
+ |import type { ThemeProps } from '@polkadot/react-components/types';
1919
+ |
1920
+ |import Network from './Network';
1921
+ |import type { Group } from './types';
1922
+ ` ,
1923
+ output : ( actual ) => {
1924
+ expect ( actual ) . toMatchInlineSnapshot ( `
1925
+ |import React, { useCallback } from 'react';
1926
+ |import styled from 'styled-components';
1927
+ |
1928
+ |import type { ThemeProps } from '@polkadot/react-components/types';
1929
+ |import { Icon } from '@polkadot/react-components';
1930
+ |
1931
+ |import type { Group } from './types';
1932
+ |import Network from './Network';
1933
+ ` ) ;
1934
+ } ,
1935
+ errors : 1 ,
1936
+ } ,
1899
1937
] ,
1900
1938
} ;
1901
1939
You can’t perform that action at this time.
0 commit comments