Пример #1
0
  it('should call formatters when `getTranslatedPhrase` function is called', () => {
    let formatterWasRun = false;

    registerPhraseFormatter('formatterChangingVariable', () => { formatterWasRun = true; });

    expect(formatterWasRun).toEqual(false);

    Handsontable.languages.getTranslatedPhrase(plPL.languageCode, INSERT_ROW_ABOVE_DICTIONARY_KEY);

    expect(formatterWasRun).toEqual(true);
  });
Пример #2
0
  it('should register formatter by `register` function', () => {
    registerPhraseFormatter('exampleFormatterName', () => {});

    expect(getAllFormatters().length).toEqual(2);
  });