From 32bc4a800e46631047a4ef9629c0e99fdcaca53d Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 8 Feb 2018 21:54:47 +0100 Subject: Add new tests --- __tests__/index.js | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/__tests__/index.js b/__tests__/index.js index 1d54f2a..805ba42 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -50,51 +50,57 @@ test('line-input-empty-raw', t => { }); test('line-input-id', t => { - const {contents} = render('[__here__]{#unicorn}'); - t.is(contents, '

'); + const {contents} = render('[__Some text__]{#unicorn}'); + t.is(contents, '

'); }); test('line-input-class', t => { - const {contents} = render('[__here__]{.unicorn}'); - t.is(contents, '

'); + const {contents} = render('[__panda__]{.unicorn}'); + t.is(contents, '

'); }); test('line-input-classes', t => { - const {contents} = render('[__here__]{.unicorn .fox}'); - t.is(contents, '

'); + const {contents} = render('[__strong unicorn__]{.unicorn .fox}'); + t.is(contents, '

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

'); + const {contents} = render('[__math exercice__]{unicorn="horse + horn"}'); + t.is(contents, '

'); }); test('line-input-overwrite-type', t => { - const {contents} = render('[__here__]{type=buttom}'); - t.is(contents, '

'); + const {contents} = render('[__Good answer__]{type=buttom}'); + t.is(contents, '

'); }); test('line-input-overwrite-placeholder', t => { - const {contents} = render('[__here__]{placeholder=\'not here\'}'); - t.is(contents, '

'); + const {contents} = render('[__Please not a bad answer__]{placeholder=\'not here\'}'); + t.is(contents, '

'); }); test('line-input-overwrite-class', t => { - const {contents} = render('[__here__]{class=\'unicorn\' .fox}'); - t.is(contents, '

'); + const {contents} = render('[__A result__]{class=\'unicorn\' .fox}'); + t.is(contents, '

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

'); + const {contents} = render('[__email__]{id=unicorn #fox}'); + t.is(contents, '

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

'); + const {contents} = render('[__Login__]{#unicorn #fox}'); + t.is(contents, '

'); }); test('line-input-raw', t => { const {contents} = renderRaw(file(join(__dirname, 'input-raw.md'))); t.snapshot(contents); }); + +test('line-input-password', t => { + const {contents} = render('[__Password__]{#passwd type=password}'); + t.is(contents, '

'); +}); + -- cgit v1.2.3