1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-30 01:23:04 +03:00
guide/back/tests/Main.hs
Vladislav Sabanov 93236f1542
Add imports to test (#272)
* Add imports to test

And swap with imports in other modules.

* Add comments

* Fix travis and add comments

* Fix travis config
2019-03-17 10:21:44 +05:00

44 lines
1.2 KiB
Haskell

{-# LANGUAGE NoImplicitPrelude #-}
module Main (main) where
-- Shared imports
import Imports
-- Testing
import Test.Hspec
-- Tests
import qualified WebSpec
import qualified MarkdownSpec
import qualified MergeSpec
main :: IO ()
main = do
hspec $ do
MarkdownSpec.tests
MergeSpec.tests
WebSpec.tests
-- 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:
~~~~~~~~~~~~~~
* 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
* 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')
-}