Skip to content

Commit

Permalink
Add a test validating figures are non-empty strings (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored Mar 24, 2021
1 parent 4e7f308 commit a51c631
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,15 @@ test('exported sets', t => {
t.is(figures.main.tick, '✔');
t.is(figures.windows.tick, '√');
});

const NON_FIGURE_KEYS = new Set(['main', 'windows']);

test('figures are non-empty strings', t => {
for (const [key, figure] of Object.entries(figures)) {
if (NON_FIGURE_KEYS.has(key)) {
continue;
}

t.true(typeof figure === 'string' && figure.trim() !== '');
}
});

0 comments on commit a51c631

Please sign in to comment.