mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-28 18:52:10 +01:00
chore: remove unnecessary test case
This commit is contained in:
parent
f9c7dbf9dd
commit
72f4338bfd
@ -231,22 +231,6 @@ describe('SettingsStatic', () => {
|
|||||||
expect(loadSettingsStub).to.have.been.calledWithExactly('/some/path/settings.yaml', 'yaml')
|
expect(loadSettingsStub).to.have.been.calledWithExactly('/some/path/settings.yaml', 'yaml')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns defaults if loading settings file throws', () => {
|
|
||||||
const error = new Error('mistakes were made')
|
|
||||||
loadSettingsStub.throws(error)
|
|
||||||
getSettingsFileBasePathStub.returns('/some/path/settings.json')
|
|
||||||
getDefaultSettingsFilePathStub.returns('/some/path/settings.yaml')
|
|
||||||
existsSyncStub.returns(true)
|
|
||||||
readdirSyncStub.returns(['file.yaml'])
|
|
||||||
|
|
||||||
expect(SettingsStatic.createSettings()).to.be.an('object')
|
|
||||||
|
|
||||||
expect(existsSyncStub).to.have.been.calledOnceWithExactly('/some/path/settings.json')
|
|
||||||
expect(getSettingsFileBasePathStub).to.have.been.calledOnce
|
|
||||||
expect(saveSettingsStub).not.to.have.been.called
|
|
||||||
expect(loadSettingsStub).to.have.been.calledOnceWithExactly('/some/path/settings.json')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('returns cached settings if set', () => {
|
it('returns cached settings if set', () => {
|
||||||
const cachedSettings = Symbol()
|
const cachedSettings = Symbol()
|
||||||
SettingsStatic._settings = cachedSettings as any
|
SettingsStatic._settings = cachedSettings as any
|
||||||
|
Loading…
x
Reference in New Issue
Block a user