import { expect } from 'chai' import { IDomainObj } from '../../../js/modules/settings/interfaces' import { emailOnMuteList, emailOnDomainMuteList } from '../../../js/modules/notification/helpers' describe('notification helpers', () => { it('gets email on muteList correctly', () => { const testMuteList = [] as string[] expect(emailOnMuteList('thu@drift.com', testMuteList)).to.be.false testMuteList.push('thu@drift.com') expect(emailOnMuteList('thu@drift.com', testMuteList)).to.be.true }) it('gets email on domain on muteList correctly', () => { const testMuteList = [] as IDomainObj[] expect(emailOnDomainMuteList('thu@drift.com', testMuteList)).to.be.false testMuteList.push({ domain: 'drift.com', date: Date.now() }) expect(emailOnDomainMuteList('thu@drift.com', testMuteList)).to.be.true }) })