chore: remove unnecessary test case

This commit is contained in:
Anton Livaja 2023-01-11 23:17:48 -05:00 committed by Ricardo Arturo Cabral Mejía
parent f9c7dbf9dd
commit 72f4338bfd

View File

@ -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