2016-08-17 11:18:57 +03:00
|
|
|
{-# LANGUAGE NoImplicitPrelude #-}
|
|
|
|
|
|
|
|
|
2016-08-21 14:32:52 +03:00
|
|
|
module Main (main) where
|
|
|
|
|
2019-03-17 08:21:44 +03:00
|
|
|
-- Shared imports
|
|
|
|
import Imports
|
2016-08-17 11:18:57 +03:00
|
|
|
-- Testing
|
2016-08-21 14:32:52 +03:00
|
|
|
import Test.Hspec
|
2016-08-17 11:18:57 +03:00
|
|
|
-- Tests
|
2016-08-21 14:32:52 +03:00
|
|
|
import qualified WebSpec
|
2016-08-21 15:13:40 +03:00
|
|
|
import qualified MarkdownSpec
|
2016-08-21 17:45:46 +03:00
|
|
|
import qualified MergeSpec
|
2016-08-21 14:32:52 +03:00
|
|
|
|
2016-08-17 11:18:57 +03:00
|
|
|
|
|
|
|
main :: IO ()
|
2016-08-21 14:32:52 +03:00
|
|
|
main = do
|
|
|
|
hspec $ do
|
2016-08-21 15:13:40 +03:00
|
|
|
MarkdownSpec.tests
|
2016-08-21 17:45:46 +03:00
|
|
|
MergeSpec.tests
|
2016-08-21 14:52:30 +03:00
|
|
|
WebSpec.tests
|
2016-08-21 14:32:52 +03:00
|
|
|
|
2019-02-26 08:40:42 +03:00
|
|
|
-- TODO: it'd be nice if we could do server-starting tests in hspec as well,
|
|
|
|
-- but I don't know how to achieve the following flow:
|
|
|
|
--
|
|
|
|
-- * before the tests, the server is started
|
|
|
|
-- * after the tests, the server is killed
|
|
|
|
-- * if you Ctrl-C during the tests, the server is killed as well
|
|
|
|
|
|
|
|
{- Tests left to write:
|
|
|
|
~~~~~~~~~~~~~~
|
2016-08-18 03:49:56 +03:00
|
|
|
* noscript tests
|
|
|
|
* test on mobile
|
|
|
|
* test that there are no repetitive searches on the admin page
|
|
|
|
* test that admin CSS hasn't creeped into main CSS and vice-versa
|
|
|
|
* test that the server is throwing no errors whatsoever during the
|
|
|
|
execution of tests
|
2016-08-19 04:07:45 +03:00
|
|
|
* changes to item description must not persist when doing Cancel and
|
|
|
|
then Edit again
|
|
|
|
* Markdown tests (e.g. Markdown doesn't work in category names)
|
|
|
|
* test that nothing is messed up by things starting and ending with newlines
|
|
|
|
(the %js bug, see description of 'mustache')
|
2016-08-18 03:49:56 +03:00
|
|
|
-}
|