Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yandeu committed Jul 21, 2023
1 parent cd6b48c commit 624a94b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/browser/link.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,22 @@
expect(window.__gotohref__).toBe('https://nanojsx.github.io/')
})

describe('Back (TODO)', async () => {
const back = (Link, { back: true, href: 'https://nanojsx.github.io/' }, 'nanojsx.github.io')
describe('Back (target.href)', async () => {
const App = () => h(Link, { back: true, href: 'https://nanojsx.github.io/' }, 'nanojsx.github.io')

expect('skip', null).toBe(null, 'Should test "back"')
render(App, root())

await Test.wait()

/** @type {HTMLLinkElement} */
const link = root()?.firstChild
link.click()

expect(window.__gotohref__).toBe('https://nanojsx.github.io/')
})

describe('Back (window.history.back)', async () => {
expect('skip', null).toBe(null, 'Should test "window.history.back()"')
})

Test.start()
Expand Down

0 comments on commit 624a94b

Please sign in to comment.