Theme properties return object when mode == 'none' #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When colors.mode == 'none', properties created by setTheme({error:'red'}) return an object instead of a string.
It looks like all the properties added by applyTheme have this behaviour of exploding strings into objects, but stylize coerces them back to strings if mode is console or browser.
Changes:
Add tests for return type of .red and .error properties for all three modes.
Modify stylize 'none' case to coerce back to strings.
This is obviously not an ideal fix, but I cannot work out WHY the applyTheme properties explode the strings into objects like that, so I've just brought 'none' into line with console and browser.