Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function createFixture(options: I18nInitOptions = {}) {
const i18nextSpy = new Spy();
const eaSpy: Spy = new Spy();
const mockSignaler = new MockSignaler();
const sut = new I18nService(
{ i18next: i18nextSpy.getMock(i18next) },
options,
eaSpy.getMock(new EventAggregator()),
mockSignaler
);
await sut.task.wait();
return { i18nextSpy, sut, eaSpy, mockSignaler };
}
function createFixture() {
const i18n = new I18nService({ i18next }, {}, new EventAggregator(), new MockSignaler());
const sut = new NumberFormatValueConverter(i18n);
return { i18n, sut };
}
function createFixture() {
const i18n = new I18nService({ i18next }, {}, new EventAggregator(), new MockSignaler());
const sut = new RelativeTimeValueConverter(i18n);
return { i18n, sut };
}
function createFixture() {
const i18n = new I18nService({ i18next }, {}, new EventAggregator(), new MockSignaler());
const sut = new DateFormatValueConverter(i18n);
return { i18n, sut };
}