From 8919a35f28dde19e400f1a277d54f503c9db365f Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 30 Dec 2018 08:00:41 +0100 Subject: Update of md-attr-parser --- __tests__/index.js | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) (limited to '__tests__') diff --git a/__tests__/index.js b/__tests__/index.js index 03176a2..ce750fe 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -49,52 +49,72 @@ test('line-input-empty-raw', t => { test('line-input-id', t => { const {contents} = render('[__Some text__]{#unicorn}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-class', t => { const {contents} = render('[_______panda__]{.unicorn}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-classes', t => { const {contents} = render('[__strong unicorn__]{.unicorn .fox}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-key-value', t => { const {contents} = render('[__math exercice__]{unicorn="horse + horn"}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-overwrite-type', t => { const {contents} = render('[__Good answer__]{type=buttom}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-overwrite-placeholder', t => { const {contents} = render('[__Please not a bad answer__]{placeholder=\'not here\'}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-overwrite-class', t => { const {contents} = render('[__A result__]{class=\'unicorn\' .fox}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-overwrite-id', t => { const {contents} = render('[__email__]{id=unicorn #fox}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-multi-id', t => { const {contents} = render('[__Login__]{#unicorn #fox}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('line-input-password', t => { const {contents} = render('[__Password__]{#passwd type=password}'); - t.deepEqual(parse(contents), parse('

')); + t.deepEqual(parse(contents), + parse('

') + ); }); test('not a line-input', t => { @@ -126,7 +146,7 @@ test('not a line-input 4', t => { }); test('is a line-input', t => { - const {contents} = renderRaw(`a[___This is a text___]qsd`); + const {contents} = renderRaw('a[___This is a text___]qsd'); t.not(null, dom5.query(parse5.parse(contents), dom5.predicates.hasTagName('input'))); }); -- cgit v1.2.3