Stand-ins for the network in the tests of an app built on podcast-clj: a sender that answers each request from a map, and the XML of a podcast feed to answer with.
Give the sender as the :send of a library's config, a store/memory of like-minded as the store of a sync, and a :now-fn as the clock, and a test runs the library with no network and no time passing, as the guide shows.
Stand-ins for the network in the tests of an app built on podcast-clj: a sender that answers each request from a map, and the XML of a podcast feed to answer with. Give the sender as the :send of a library's config, a store/memory of like-minded as the store of a sync, and a :now-fn as the clock, and a test runs the library with no network and no time passing, as the guide shows.
(feed)(feed opts)The XML of the RSS feed of a podcast with the opts below, over
feed-defaults, e.g. for a response of sender.
The XML of the RSS feed of a podcast with the `opts` below, over feed-defaults, e.g. for a response of sender. - :title, the title of the show - :url, where the feed is, which names its podcast:guid and its files - :guid, the podcast:guid, else that of the :url - :episodes, how many episodes, numbered from 1, the newest first - :start, when episode 1 came out, and :days, how many days apart they come - :seconds, how long each episode lasts
The options of feed that its options don't give.
The options of feed that its options don't give.
(sender responses)(sender responses {:keys [log] :as opts})A function to give as :send, which answers each request by its URL from
responses, a map of URL to a response, with the opts below.
A response is a map of a :status, 200 by default, the :headers and the
:body. A request whose If-None-Match names the ETag of its response, or
whose If-Modified-Since names its Last-Modified, gets a 304, as a server
answers when nothing changed. A URL without a response gets a 404. The
opts are:
A function to give as :send, which answers each request by its URL from `responses`, a map of URL to a response, with the `opts` below. A response is a map of a :status, 200 by default, the :headers and the :body. A request whose If-None-Match names the ETag of its response, or whose If-Modified-Since names its Last-Modified, gets a 304, as a server answers when nothing changed. A URL without a response gets a 404. The `opts` are: - :log, an atom of a vector, to which each request is added
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |