2016-08-17 11:18:57 +03:00
|
|
|
{-# LANGUAGE NoImplicitPrelude #-}
|
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
|
|
|
|
|
2016-08-21 14:32:52 +03:00
|
|
|
module Main (main) where
|
|
|
|
|
|
|
|
import BasePrelude
|
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 15:13:40 +03:00
|
|
|
-- TODO: it'd be nice if we could us WebSpec.tests in hspec as well,
|
|
|
|
-- but I don't know how to achieve the following:
|
|
|
|
-- * before WebSpec tests, the server is started
|
|
|
|
-- * after those tests, the server is killed
|
|
|
|
-- * if you Ctrl-C during the tests, the server is killed as well
|
2016-08-21 14:52:30 +03:00
|
|
|
WebSpec.tests
|
2016-08-21 14:32:52 +03:00
|
|
|
|
|
|
|
{- TODO
|
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
|
|
|
|
* test that pages are indeed cached
|
|
|
|
* test that changing some pages doesn't invalidate the entire cache
|
|
|
|
* 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
|
|
|
-}
|