1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE PackageImports #-}
3module Language.PureScript.IdeSpec where
5import Control.Concurrent.STM
6import Control.Monad.Reader
8import qualified Data.Map as Map
9import Language.PureScript.Ide
10import Language.PureScript.Ide.Types
13testState :: PscIdeState
14testState = PscIdeState (Map.fromList [("Data.Array", []), ("Control.Monad.Eff", [])]) (Map.empty)
16defaultConfig :: Configuration
20 confOutputPath = "output/"
27 describe "loadedModules" $ do
28 it "returns an empty list when no modules are loaded" $ do
29 st <- newTVarIO emptyPscIdeState
30 result <- runReaderT printModules (PscIdeEnvironment st defaultConfig)
31 result `shouldBe` ModuleList []
32 it "returns the list of loaded modules" $ do
33 st <- newTVarIO testState
34 ModuleList result <- runReaderT printModules (PscIdeEnvironment st defaultConfig)
35 sort result `shouldBe` sort ["Data.Array", "Control.Monad.Eff"]
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list