Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@Test fun `if the visited URL is the default then redirect to the last visited from the browser's history`() {
val browser = Browser(StubHistory(lastVisited = URL("")))
assertThat(browser.activeURL, equalTo(URL("")))
private class StubHistory(
private val lastVisited: URL
) : History {
override fun push(url: URL) {
override fun pop(): URL {
TODO("Not yet implemented")
override fun peek(): URL {
return lastVisited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment