mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-23 23:10:17 +05:30
Run after full implementation to enforce 2-space / 100-char / single-quote conventions across all new + adjacent files.
27 lines
977 B
JavaScript
27 lines
977 B
JavaScript
const {
|
|
getDefaults,
|
|
getActiveMonoFont,
|
|
isLigaturesEnabled,
|
|
} = require('../src/main/settings/monospaceSettings');
|
|
|
|
describe('monospaceSettings', () => {
|
|
test('getDefaults returns sane defaults', () => {
|
|
const d = getDefaults();
|
|
expect(d.monospaceFont).toBe('jetbrains-mono');
|
|
expect(d.monospaceLigatures).toBe(false);
|
|
});
|
|
|
|
test('getActiveMonoFont returns the active family', () => {
|
|
expect(getActiveMonoFont({ monospaceFont: 'fira-code' })).toBe('Fira Code');
|
|
expect(getActiveMonoFont({})).toBe('JetBrains Mono');
|
|
expect(getActiveMonoFont({ monospaceFont: 'bogus' })).toBe('JetBrains Mono');
|
|
});
|
|
|
|
test('isLigaturesEnabled reads boolean strictly', () => {
|
|
expect(isLigaturesEnabled({ monospaceLigatures: true })).toBe(true);
|
|
expect(isLigaturesEnabled({ monospaceLigatures: false })).toBe(false);
|
|
expect(isLigaturesEnabled({})).toBe(false);
|
|
expect(isLigaturesEnabled({ monospaceLigatures: 'yes' })).toBe(false);
|
|
});
|
|
});
|