mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Add tests
This commit is contained in:
parent
4245fc1fb0
commit
078e2d0414
@ -12,4 +12,26 @@ all =
|
||||
\() ->
|
||||
FilePattern.match [] "some/file/path.ext"
|
||||
|> Expect.equal False
|
||||
, test "should return True when the list contains the target file" <|
|
||||
\() ->
|
||||
FilePattern.match
|
||||
[ FilePattern.include "some/file/path.ext"
|
||||
]
|
||||
"some/file/path.ext"
|
||||
|> Expect.equal True
|
||||
, test "should return True when the list a Glob matching a parent" <|
|
||||
\() ->
|
||||
FilePattern.match
|
||||
[ FilePattern.include "some/file/**"
|
||||
]
|
||||
"some/file/path.ext"
|
||||
|> Expect.equal True
|
||||
, test "should return False when the list a Glob matching a parent but exclude the file itself" <|
|
||||
\() ->
|
||||
FilePattern.match
|
||||
[ FilePattern.include "some/file/**"
|
||||
, FilePattern.exclude "some/file/path.ext"
|
||||
]
|
||||
"some/file/path.ext"
|
||||
|> Expect.equal False
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user