Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
d4d30313
Commit
d4d30313
authored
Aug 19, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Test] fix tests
purs repl works now
parent
d51ae155
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Spec.purs
test/Gargantext/Components/NgramsTable/Spec.purs
+5
-4
Main.purs
test/Main.purs
+2
-1
No files found.
test/Gargantext/Components/NgramsTable/Spec.purs
View file @
d4d30313
module Gargantext.Components.NgramsTable.Spec where
module Gargantext.Components.NgramsTable.Spec where
import Prelude
import Prelude
import Gargantext.Config (CTabNgramType(..))
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Gargantext.Components.NgramsTable.Core (highlightNgrams, NgramsElement(..), NgramsTable(..))
import Gargantext.Components.NgramsTable.Core (highlightNgrams, NgramsElement(..), NgramsTable(..))
...
@@ -41,7 +42,7 @@ spec = do
...
@@ -41,7 +42,7 @@ spec = do
,Tuple " at every " Nothing
,Tuple " at every " Nothing
,Tuple "candidate" (Just CandidateTerm)
,Tuple "candidate" (Just CandidateTerm)
]
]
highlightNgrams table input `shouldEqual` output
highlightNgrams
CTabTerms
table input `shouldEqual` output
it "works when pattern overlaps" do
it "works when pattern overlaps" do
let table = NgramsTable
let table = NgramsTable
...
@@ -66,7 +67,7 @@ spec = do
...
@@ -66,7 +67,7 @@ spec = do
,Tuple " " Nothing
,Tuple " " Nothing
,Tuple "the" (Just GraphTerm)
,Tuple "the" (Just GraphTerm)
]
]
highlightNgrams table input `shouldEqual` output
highlightNgrams
CTabTerms
table input `shouldEqual` output
it "works when pattern overlaps 2" do
it "works when pattern overlaps 2" do
let table = NgramsTable
let table = NgramsTable
...
@@ -80,7 +81,7 @@ spec = do
...
@@ -80,7 +81,7 @@ spec = do
,Tuple " space " Nothing
,Tuple " space " Nothing
,Tuple "images" (Just GraphTerm)
,Tuple "images" (Just GraphTerm)
]
]
highlightNgrams table input `shouldEqual` output
highlightNgrams
CTabTerms
table input `shouldEqual` output
it "works with punctuation" do
it "works with punctuation" do
let table = NgramsTable
let table = NgramsTable
...
@@ -90,4 +91,4 @@ spec = do
...
@@ -90,4 +91,4 @@ spec = do
,Tuple "graph" (Just GraphTerm)
,Tuple "graph" (Just GraphTerm)
,Tuple ", after" Nothing
,Tuple ", after" Nothing
]
]
highlightNgrams table input `shouldEqual` output
highlightNgrams
CTabTerms
table input `shouldEqual` output
test/Main.purs
View file @
d4d30313
...
@@ -2,9 +2,10 @@ module Test.Main where
...
@@ -2,9 +2,10 @@ module Test.Main where
import Prelude
import Prelude
import Effect (Effect)
import Effect (Effect)
import Effect.Aff (launchAff_)
import Test.Spec.Discovery (discover)
import Test.Spec.Discovery (discover)
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Runner (run)
import Test.Spec.Runner (run)
main :: Effect Unit
main :: Effect Unit
main = discover "Gargantext\\..*Spec" >>= run [consoleReporter]
main = discover "Gargantext\\..*Spec" >>= run [consoleReporter]
>>> launchAff_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment