1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-18 04:01:45 +00:00

jest-codemods tests/lib

This commit is contained in:
amedora
2019-08-07 14:17:48 +09:00
parent 606be4304d
commit ffb2603485
12 changed files with 92 additions and 104 deletions

View File

@@ -1,16 +1,15 @@
/**
* @fileoverview Unit test for browser/lib/normalizeEditorFontFamily
*/
import test from 'ava'
import normalizeEditorFontFamily from '../../browser/lib/normalizeEditorFontFamily'
import consts from '../../browser/lib/consts'
const defaultEditorFontFamily = consts.DEFAULT_EDITOR_FONT_FAMILY
test('normalizeEditorFontFamily() should return default font family (string[])', t => {
t.is(normalizeEditorFontFamily(), defaultEditorFontFamily.join(', '))
test('normalizeEditorFontFamily() should return default font family (string[])', () => {
expect(normalizeEditorFontFamily()).toBe(defaultEditorFontFamily.join(', '))
})
test('normalizeEditorFontFamily(["hoge", "huga"]) should return default font family connected with arg.', t => {
test('normalizeEditorFontFamily(["hoge", "huga"]) should return default font family connected with arg.', () => {
const arg = 'font1, font2'
t.is(normalizeEditorFontFamily(arg), `${arg}, ${defaultEditorFontFamily.join(', ')}`)
expect(normalizeEditorFontFamily(arg)).toBe(`${arg}, ${defaultEditorFontFamily.join(', ')}`)
})