mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Let's not ship with TextMate theme support. Our .less theme files are easier to read and write than TextMate themes. If we want to use TextMate themes we should write a script that converts them to the Atom .less version. Closes #629
26 lines
1.0 KiB
CoffeeScript
26 lines
1.0 KiB
CoffeeScript
$ = require 'jquery'
|
|
|
|
Theme = require 'theme'
|
|
ThemeManager = require 'theme-manager'
|
|
|
|
describe "ThemeManager", ->
|
|
describe "when the core.themes config value changes", ->
|
|
it "add/removes stylesheets to reflect the new config value", ->
|
|
themeManager = new ThemeManager()
|
|
spyOn(themeManager, 'getUserStylesheetPath').andCallFake -> null
|
|
themeManager.load()
|
|
config.set('core.themes', [])
|
|
expect($('style.userTheme').length).toBe 0
|
|
|
|
config.set('core.themes', ['atom-dark-syntax'])
|
|
expect($('style.userTheme').length).toBe 1
|
|
expect($('style.userTheme:eq(0)').attr('id')).toMatch /atom-dark-syntax.less$/
|
|
|
|
config.set('core.themes', ['atom-light-syntax', 'atom-dark-syntax'])
|
|
expect($('style.userTheme').length).toBe 2
|
|
expect($('style.userTheme:eq(0)').attr('id')).toMatch /atom-light-syntax.less$/
|
|
expect($('style.userTheme:eq(1)').attr('id')).toMatch /atom-dark-syntax.less$/
|
|
|
|
config.set('core.themes', [])
|
|
expect($('style.userTheme').length).toBe 0
|