@@ -10,20 +10,28 @@ describe('link', () => {
1010 mockPlatform . mockReturnValueOnce ( 'darwin' ) ;
1111 link . setPlatform ( 'android' ) ;
1212
13- const url = new URL ( link . docs ( 'environment-setup' , 'inherit' ) ) . toString ( ) ;
13+ const url = new URL (
14+ link . docs ( 'set-up-your-environment' , 'inherit' ) ,
15+ ) . toString ( ) ;
1416 expect ( url ) . toMatch ( / o s = m a c o s / ) ;
1517 expect ( url ) . toMatch ( / p l a t f o r m = a n d r o i d / ) ;
1618 expect ( url ) . toEqual (
17- expect . stringContaining ( 'https://reactnative.dev/docs/environment-setup' ) ,
19+ expect . stringContaining (
20+ 'https://reactnative.dev/docs/set-up-your-environment' ,
21+ ) ,
1822 ) ;
1923
2024 // Handles a change of os
2125 mockPlatform . mockReturnValueOnce ( 'win32' ) ;
22- expect ( link . docs ( 'environment-setup' , 'inherit' ) ) . toMatch ( / o s = w i n d o w s / ) ;
26+ expect ( link . docs ( 'set-up-your-environment' , 'inherit' ) ) . toMatch (
27+ / o s = w i n d o w s / ,
28+ ) ;
2329
2430 // Handles a change of platform
2531 link . setPlatform ( 'ios' ) ;
26- expect ( link . docs ( 'environment-setup' , 'inherit' ) ) . toMatch ( / p l a t f o r m = i o s / ) ;
32+ expect ( link . docs ( 'set-up-your-environment' , 'inherit' ) ) . toMatch (
33+ / p l a t f o r m = i o s / ,
34+ ) ;
2735
2836 // Handles cases where we don't need a platform
2937 expect ( link . blog ( '2019/11/18/react-native-doctor' , 'none' ) ) . not . toMatch (
@@ -32,7 +40,9 @@ describe('link', () => {
3240 } ) ;
3341
3442 it ( 'preserves anchor-links' , ( ) => {
35- expect ( link . docs ( 'environment-setup' , 'inherit' , 'ruby' ) ) . toMatch ( / # r u b y / ) ;
43+ expect ( link . docs ( 'set-up-your-environment' , 'inherit' , 'ruby' ) ) . toMatch (
44+ / # r u b y / ,
45+ ) ;
3646 } ) ;
3747
3848 describe ( 'overrides' , ( ) => {
@@ -41,8 +51,8 @@ describe('link', () => {
4151 [ { hash : 'ruby' } , / # r u b y / ] ,
4252 [ { hash : 'ruby' , os : 'linux' } , / o s = l i n u x / ] ,
4353 [ { 'extra stuff' : 'here?ok' } , / e x t r a \+ s t u f f = h e r e % 3 F o k / ] ,
44- ] ) ( "link.doc('environment-setup , %o) -> %o" , ( param , re ) => {
45- expect ( link . docs ( 'environment-setup ' , 'none' , param ) ) . toMatch ( re ) ;
54+ ] ) ( "link.doc('set-up-your-environment , %o) -> %o" , ( param , re ) => {
55+ expect ( link . docs ( 'set-up-your-environment ' , 'none' , param ) ) . toMatch ( re ) ;
4656 } ) ;
4757 } ) ;
4858
@@ -59,9 +69,9 @@ describe('link', () => {
5969 afterAll ( ( ) => link . setVersion ( null ) ) ;
6070 it ( 'supports linking to a specific version of React Native' , ( ) => {
6171 link . setVersion ( '0.71' ) ;
62- expect ( link . docs ( 'environment-setup ' , 'ios' , 'ruby' ) ) . toEqual (
72+ expect ( link . docs ( 'set-up-your-environment ' , 'ios' , 'ruby' ) ) . toEqual (
6373 expect . stringContaining (
64- 'https://reactnative.dev/docs/0.71/environment-setup ' ,
74+ 'https://reactnative.dev/docs/0.71/set-up-your-environment ' ,
6575 ) ,
6676 ) ;
6777 } ) ;
0 commit comments