From 4e4b7972b40a030e5941a2972d60b5fbb079874b Mon Sep 17 00:00:00 2001 From: Amio Date: Sun, 15 Jul 2018 17:25:25 +0800 Subject: [PATCH] Add tests for option {style: 'flat'} --- test/index.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/index.spec.js b/test/index.spec.js index c5b2663..4cf3463 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -12,3 +12,15 @@ tap.test('generate badge with { subject, status, color }', t => { t.ok(typeof svg === 'string', 'successfully generated') t.end() }) + +tap.test('generate flat badge with { subject, status }', t => { + const svg = badgen({ subject: 'npm', status: 'v1.0.0' }, { style: 'flat' }) + t.ok(typeof svg === 'string', 'successfully generated') + t.end() +}) + +tap.test('generate flat badge with { subject, status, color }', t => { + const svg = badgen({ subject: 'npm', status: 'v1.0.0', color: 'ADF' }, { style: 'flat' }) + t.ok(typeof svg === 'string', 'successfully generated') + t.end() +})