mirror of
https://github.com/Cameri/nostream.git
synced 2025-06-10 17:01:17 +02:00
24 lines
598 B
TypeScript
24 lines
598 B
TypeScript
import { expect } from 'chai'
|
|
import Sinon from 'sinon'
|
|
|
|
import { createSettings } from '../../../src/factories/settings-factory'
|
|
import { SettingsStatic } from '../../../src/utils/settings'
|
|
|
|
describe('getSettings', () => {
|
|
let createSettingsStub: Sinon.SinonStub
|
|
|
|
beforeEach(() => {
|
|
createSettingsStub = Sinon.stub(SettingsStatic, 'createSettings')
|
|
})
|
|
|
|
afterEach(() => {
|
|
createSettingsStub.restore()
|
|
})
|
|
|
|
it('calls createSettings and returns', () => {
|
|
const settings = Symbol()
|
|
createSettingsStub.returns(settings)
|
|
|
|
expect(createSettings()).to.equal(settings)
|
|
})
|
|
}) |