Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Mar 21, 2023
1 parent b2c264e commit b47c69f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/x_getDisplay.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,20 @@ const rows = [
{ args: [defaults, ['bold', 'blue'], ''], expected: { ...defaults.baseDisplay, messageStyle: ['bold', 'blue'], desktop: false } },

// Setting an object

{ args: [defaults, { messageStyle: 'red' }, ''], expected: { ...defaults.baseDisplay, messageStyle: 'red' } },
{ args: [defaults, { messageStyle: 'bold' }, ''], expected: { ...defaults.baseDisplay, messageStyle: 'bold' } },
{ args: [defaults, { messageStyle: ['red'] }, ''], expected: { ...defaults.baseDisplay, messageStyle: ['red'] } },
{ args: [defaults, { messageStyle: ['bold'] }, ''], expected: { ...defaults.baseDisplay, messageStyle: ['bold'] } },
{ args: [defaults, { messageStyle: ['bold', 'blue'] }, ''], expected: { ...defaults.baseDisplay, messageStyle: ['bold', 'blue'] } },

// Setting an object and desktop
{ args: [defaults, { messageStyle: 'red' }, true], expected: { ...defaults.baseDisplay, messageStyle: 'red', desktop: true } },
{ args: [defaults, { messageStyle: 'bold' }, false], expected: { ...defaults.baseDisplay, messageStyle: 'bold', desktop: false } },
{ args: [defaults, { messageStyle: ['red'] }, {}], expected: { ...defaults.baseDisplay, messageStyle: ['red'], desktop: false } },
{ args: [defaults, { messageStyle: ['bold'] }, []], expected: { ...defaults.baseDisplay, messageStyle: ['bold'], desktop: false } },
{ args: [defaults, { messageStyle: ['bold', 'blue'] }, ''], expected: { ...defaults.baseDisplay, messageStyle: ['bold', 'blue'], desktop: false } },

// more display options
];

describe(name, () => {
Expand Down

0 comments on commit b47c69f

Please sign in to comment.