clinntp
Version:
A cli nntp news reader
21 lines (17 loc) • 536 B
JavaScript
import Conf from 'conf'
import { assert } from 'chai'
import { clear } from '../src/clear'
import { name } from '../package.json'
describe('#clear()', function () {
this.beforeEach(function () {
const config = new Conf()
config.clear()
})
it('clears current config', function () {
const config = new Conf()
config.set(name, { limit: -1, port: 119, host: 'news.epita.fr', newsgroups: '*' })
assert.notEqual(config.get(name), undefined)
clear(config)
assert.equal(config.get(name), undefined)
})
})