mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +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')
|
||||
})
|
||||
|
||||
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', () => {
|
||||
const cachedSettings = Symbol()
|
||||
SettingsStatic._settings = cachedSettings as any
|
||||
|
Loading…
x
Reference in New Issue
Block a user