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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
bbf59db1
Commit
bbf59db1
authored
Aug 05, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Test] fix NgramsTable/Spec.purs test
parent
0dd521cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Spec.purs
test/Gargantext/Components/NgramsTable/Spec.purs
+5
-4
No files found.
test/Gargantext/Components/NgramsTable/Spec.purs
View file @
bbf59db1
...
@@ -4,6 +4,7 @@ import Prelude
...
@@ -4,6 +4,7 @@ import Prelude
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(..))
import Gargantext.Config (CTabNgramType(..))
import Gargantext.Types (TermList(..))
import Gargantext.Types (TermList(..))
import Test.Spec (Spec, describe, it)
import Test.Spec (Spec, describe, it)
import Test.Spec.Assertions (shouldEqual)
import Test.Spec.Assertions (shouldEqual)
...
@@ -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
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