Slide 49
Slide 49 text
4
You can (and should) write test for bindings
test("DateTime.local(2017) is the beginning of the year", () => {
let dt = DateTime.local(~year=2017, ());
expect(getDateObject(dt))
|> toEqual({
"year": 2017,
"month": 1,
"day": 1,
"hour": 0,
"minute": 0,
"second": 0,
"millisecond": 0
});
});
49