From 4e4890ccc88561afcd2064dab10195db58e65929 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 30 May 2017 00:53:43 -0700 Subject: [PATCH] Added tests for 'children' set to both elements and functions to elements in 'react-router'. --- types/react-router/test/Children.tsx | 22 ++++++++++++++++++++++ types/react-router/tsconfig.json | 1 + 2 files changed, 23 insertions(+) create mode 100644 types/react-router/test/Children.tsx diff --git a/types/react-router/test/Children.tsx b/types/react-router/test/Children.tsx new file mode 100644 index 0000000000..8e4faad089 --- /dev/null +++ b/types/react-router/test/Children.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { Route } from 'react-router'; + +function RouteWithFunctionChildrenAttribute() { + return
Hello!
} /> +} + +function RouteWithFunctionJsxChildren() { + return + {() =>
Hello!
} +
+} + +function RouteWithElementChildrenAttribute() { + return Hello!} /> +} + +function RouteWithElementJsxChildren() { + return + {
Hello!
} +
+} \ No newline at end of file diff --git a/types/react-router/tsconfig.json b/types/react-router/tsconfig.json index df074843df..f3a225ece1 100644 --- a/types/react-router/tsconfig.json +++ b/types/react-router/tsconfig.json @@ -18,6 +18,7 @@ "test/Animation.tsx", "test/Auth.tsx", "test/Basic.tsx", + "test/Children.tsx", "test/CustomLink.tsx", "test/ModalGallery.tsx", "test/NavigateWithContext.tsx",