From 66c13f1a76915e502d22ace1198cb7d8789a668b Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 7 Feb 2018 03:02:03 +0100 Subject: more tests --- __tests__/index.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 8 deletions(-) (limited to '__tests__/index.js') diff --git a/__tests__/index.js b/__tests__/index.js index 27150a5..b81991d 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -25,24 +25,67 @@ const renderRaw = text => unified() .use(stringify) .processSync(text); -test('text simple', t => { +test('snapshot simple', t => { const {contents} = render(file(join(__dirname, 'text.md'))); t.snapshot(contents); }); -test('text raw', t => { +test('snapshot raw', t => { const {contents} = renderRaw(file(join(__dirname, 'text.md'))); t.snapshot(contents); }); -test.todo('empty'); -test.todo('empty raw'); +test('emty', t => { + const {contents} = render('[____\n____]'); + t.is(contents, ''); +}); + +test('emty-raw', t => { + const {contents} = renderRaw('[____\n____]'); + t.is(contents, ''); +}); + +test('simple', t => { + const {contents} = render('[____\nHere some text\n____]'); + t.is(contents, ''); +}); + +test('simple-raw', t => { + const {contents} = renderRaw('[____\nHere some text\n____]'); + t.is(contents, ''); +}); + +test('long', t => { + const {contents} = render(` +[_______ -test.todo('simple'); -test.todo('simple raw'); +Here some awesome text ! +With severale lines, ... -test.todo('long'); -test.todo('long raw'); +a good text area +_______]`); + t.is(contents, ``); +}); + +test('long-raw', t => { + const {contents} = renderRaw(` +[_______ + +Here some awesome text ! +With severale lines, ... + +a good text area +_______]`); + t.is(contents, ``); +}); test.todo('id text'); test.todo('class'); -- cgit v1.2.3-54-g00ecf