diff --git a/tests/cases/fourslash/moveToNewFileReactComponent.ts b/tests/cases/fourslash/moveToNewFileReactComponent.ts new file mode 100644 index 00000000000..c3193b77722 --- /dev/null +++ b/tests/cases/fourslash/moveToNewFileReactComponent.ts @@ -0,0 +1,34 @@ +/// + +// @jsx: react + +// @Filename: /Component.tsx +////import React from 'react'; +//// +////export const ComponentA = () => { +//// return
Component A
; +////}; +//// +////[|export const ComponentB = () => { +//// return
Component B
; +////};|] + +verify.moveToNewFile({ + newFileContents: { + "/Component.tsx": +`import React from 'react'; + +export const ComponentA = () => { + return
Component A
; +}; +`, + + "/ComponentB.tsx": +`import React from 'react'; + +export const ComponentB = () => { + return
Component B
; +}; +`, + }, +}); \ No newline at end of file