]> Git — Sourcephile - gargantext.git/blob - src-test/Core/Utils.hs
[social] fixes for more qualified imports
[gargantext.git] / src-test / Core / Utils.hs
1 {-|
2 Module : Core.Utils
3 Description :
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
8 Portability : POSIX
9
10 -}
11
12 module Core.Utils where
13
14 import Test.Hspec
15
16 import Gargantext.Prelude
17
18 import Gargantext.Core.Utils
19
20 -- | Core.Utils tests
21 test :: IO ()
22 test = hspec $ do
23 describe "check if groupWithCounts works" $ do
24 it "simple integer array" $ do
25 (groupWithCounts [1, 2, 3, 1, 2, 3]) `shouldBe` [(1, 2), (2, 2), (3, 2)]
26
27 it "string" $ do
28 (groupWithCounts "abccba") `shouldBe` [('a', 2), ('b', 2), ('c', 2)]