mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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:
committed by
Winston Liu
parent
218657f373
commit
4c47249be0
@@ -319,9 +319,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(
|
||||
|
||||
Reference in New Issue
Block a user