Use correct fontWeight value in ThemeManager spec

In Chrome 66+ it seems that getComputedStyle().fontWeight returns the computed
numeric value of the style instead of the original descriptive name.  We now
look for value '700' which corresponds to the value of 'bold'.
This commit is contained in:
David Wilson 2019-01-03 15:56:58 -08:00 committed by David Wilson
parent eee7ae8abe
commit ff429230f1

View File

@ -251,9 +251,9 @@ h2 {
it('returns a disposable allowing styles applied by the given path to be removed', function () {
const cssPath = require.resolve('./fixtures/css.css')
expect(getComputedStyle(document.body).fontWeight).not.toBe('bold')
expect(getComputedStyle(document.body).fontWeight).not.toBe('700')
const disposable = atom.themes.requireStylesheet(cssPath)
expect(getComputedStyle(document.body).fontWeight).toBe('bold')
expect(getComputedStyle(document.body).fontWeight).toBe('700')
let styleElementRemovedHandler
atom.styles.onDidRemoveStyleElement(styleElementRemovedHandler = jasmine.createSpy('styleElementRemovedHandler'))