add tests
This commit is contained in:
1 parent
a763ceb6df
commit
c77bd48f95
3 files changed
+190
No files matched your search
@@ -0,0 +1,24 @@
|
||||
defmodule FeedReader.TestSupport.ParserHaltFormat do
|
||||
@behaviour FeedReader.Format
|
||||
|
||||
@impl true
|
||||
def id, do: :parser_halt
|
||||
|
||||
@impl true
|
||||
def matches_prefix?(_prefix), do: true
|
||||
|
||||
@impl true
|
||||
def handler, do: FeedReader.TestSupport.ParserHaltHandler
|
||||
|
||||
@impl true
|
||||
def new_parser_state(_event_sink, opts) do
|
||||
if Keyword.get(opts, :normal_exit), do: exit(:normal)
|
||||
nil
|
||||
end
|
||||
|
||||
@impl true
|
||||
def normalize_feed(_state, _opts), do: %FeedReader.Feed{}
|
||||
|
||||
@impl true
|
||||
def normalize_item(_raw_item, _feed, _opts), do: :skip
|
||||
end
|
||||
Reference in new issue
Block a user