Skip to content

Commit

Permalink
Test for Login component
Browse files Browse the repository at this point in the history
  • Loading branch information
RawToast committed Apr 3, 2018
1 parent ff41b79 commit 9ab91a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dokusho/src/app/DokuUtil.re
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ module DokuUtil = {
module DateUtil = {
open Types;

let availableDates = (d: readingHistory) => d.days |> List.map(d => Js.Date.fromString(d.date)) |> (ls) => [Js.Date.make(), ...ls] |> Array.of_list;
let availableDates = (d: readingHistory) => d.days
|> List.map(d => Js.Date.fromString(d.date))
|> (ls) => [Js.Date.make(), ...ls]
|> Array.of_list;

let dateWithoutTime = selectedDate => Js.Date.fromFloat(Js.Date.utcWithYMDHMS(
~year=Js.Date.getFullYear(selectedDate),
Expand Down
13 changes: 13 additions & 0 deletions dokusho/src/test/Login_test.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
open Jest;

describe("Login", () => {
open ExpectJs;

describe("Login.make", () => {
test("renders with no parameters", () => {
let component = ReactShallowRenderer.renderWithRenderer(<Login/>);

expect(Js.Undefined.return(component)) |> toBeDefined;
});
});
});

0 comments on commit 9ab91a9

Please sign in to comment.