nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.
https://nvim-orgmode.github.io/
MIT License
3.04k stars 134 forks source link

Tests fails locally on date spec timestampss #16

Closed patgro1 closed 3 years ago

patgro1 commented 3 years ago

Describe the bug When running make test locally, the test are always failing in the date_spec file. Always giving a timestamp error.

To Reproduce Steps to reproduce the behavior: run make test

Screenshots Here is a small part of the logs. In the end, 11 tests passes while 14 are failed.

========================================
Testing:        /home/pgrogan/workstation_setup/orgmode.nvim/tests/plenary/object/date_spec.lua
Fail    ||      Date object shoud parse date
            ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:14: Expected objects to be the same.
            Passed in:
            (number) 1623297600
            Expected:
            (number) 1623276000

            stack traceback:
                ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:14: in function <...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:4>

Fail    ||      Date object should parse date time
            ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:41: Expected objects to be the same.
            Passed in:
            (number) 1625490000
            Expected:
            (number) 1625468400

            stack traceback:
                ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:41: in function <...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:32>

Fail    ||      Date object should parse date time with dayname and warning adjustment
            ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:64: Expected objects to be the same.
            Passed in:
            (number) 1625058000
            Expected:
            (number) 1625036400

            stack traceback:
                ...on_setup/orgmode.nvim/tests/plenary/object/date_spec.lua:64: in function <...

System information:

kristijanhusak commented 3 years ago

Yeah that's because I wrote assertions in my timezone. I'll update it to assert according to local time. Thanks for noting.