Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d10446
commit 5751226
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
const {test} = require('tap'); | ||
const chalk = require('../lib/chalk'); | ||
|
||
test('throws an error when trying to access chalk config and chalk config is not configured', t => { | ||
t.throws(chalk.get, 'Chalk has not yet been configured'); | ||
t.end(); | ||
}); | ||
|
||
test('throws an error when trying to set chalk config and chalk config is configured', t => { | ||
chalk.set({}); | ||
t.throws(chalk.set, 'Chalk has already been configured'); | ||
t.end(); | ||
}); |