UNPKG

iterm-theme-parser

Version:

Parser for iTerm2 itermcolors files to work with HyperTerm configuration

18 lines (15 loc) 498 B
const fs = require('fs'); const expect = require('chai').expect; const itermColors = require('./index.js'); describe('itermColors.parse', () => { it('Should parse colors correctly', () => { const str = fs.readFileSync('test_themes/honukai.itermcolors', 'utf8'); const htColors = itermColors.parse(str); expect(htColors).to.have.keys([ 'foregroundColor', 'backgroundColor', 'colors', ]); expect(Object.keys(htColors.colors)).to.have.lengthOf(16); }); });