Expect double quotes for multi-word font names in spec

getComputedStyle seems to return font families this way in Chrome 52
This commit is contained in:
Max Brunsfeld 2016-08-24 16:19:41 -07:00 committed by Thomas Johansen
parent 6ca1676bcb
commit 1ddce8b4a0

View File

@ -48,12 +48,12 @@ describe "WorkspaceElement", ->
it "updates the font-family based on the 'editor.fontFamily' config value", ->
initialCharWidth = editor.getDefaultCharWidth()
fontFamily = atom.config.get('editor.fontFamily')
fontFamily += ", 'Apple Color Emoji'" if process.platform is 'darwin'
fontFamily += ', "Apple Color Emoji"' if process.platform is 'darwin'
expect(getComputedStyle(editorElement).fontFamily).toBe fontFamily
atom.config.set('editor.fontFamily', 'sans-serif')
fontFamily = atom.config.get('editor.fontFamily')
fontFamily += ", 'Apple Color Emoji'" if process.platform is 'darwin'
fontFamily += ', "Apple Color Emoji"' if process.platform is 'darwin'
expect(getComputedStyle(editorElement).fontFamily).toBe fontFamily
expect(editor.getDefaultCharWidth()).not.toBe initialCharWidth