Simon Egersand
2018-02-11 d4bf16e299f8ea25477ed9c15a336bce36affe4b
Add tests for TS value and defaultValue

From https://github.com/YouCanBookMe/react-datetime/pull/297
1 files modified
17 ■■■■■ changed files
typings/react-datetime-tests.tsx 17 ●●●●● patch | view | raw | blame | history
typings/react-datetime-tests.tsx
@@ -1,5 +1,6 @@
import * as React from "react";
import { Moment } from "moment";
import * as moment from "moment";
import * as ReactDatetime from "react-datetime";
/*
@@ -20,6 +21,22 @@
        defaultValue={ new Date() }
    />;
const TEST_DATE_PROPS_FOR_VALUE_AS_MOMENT: JSX.Element = <ReactDatetime
        value={ moment() }
    />;
const TEST_DATE_PROPS_FOR_VALUE_AS_STRING: JSX.Element = <ReactDatetime
        value={ '1995-12-25' }
    />;
const TEST_DATE_PROPS_FOR_DEFAULT_VALUE_AS_MOMENT: JSX.Element = <ReactDatetime
        defaultValue={ moment() }
    />;
const TEST_DATE_PROPS_FOR_DEFAULT_VALUE_AS_STRING: JSX.Element = <ReactDatetime
        defaultValue={ '1995-12-25' }
    />;
/*
 Test formats
 */