mirror of
https://github.com/dwaxweiler/connector-mobilizon
synced 2025-04-20 05:17:27 +02:00
16 lines
389 B
JavaScript
16 lines
389 B
JavaScript
import test from 'ava';
|
|
import { JSDOM } from 'jsdom';
|
|
|
|
import * as HtmlCreator from './html-creator';
|
|
|
|
test.beforeEach(() => {
|
|
global.document = new JSDOM().window.document
|
|
})
|
|
|
|
test('createAnchorElement() usual parameters', t => {
|
|
const a = HtmlCreator.createAnchorElement({ text: 'a', url: 'b' })
|
|
t.is(a.tagName, 'A')
|
|
t.is(a.innerHTML, 'a')
|
|
t.is(a.getAttribute('href'), 'b')
|
|
})
|