mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fix spec now that Theme.load returns a theme instead of an array
This commit is contained in:
@@ -3,20 +3,20 @@ fs = require 'fs'
|
|||||||
Theme = require 'theme'
|
Theme = require 'theme'
|
||||||
|
|
||||||
describe "@load(name)", ->
|
describe "@load(name)", ->
|
||||||
themes = null
|
theme = null
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
$("#jasmine-content").append $("<div class='editor'></div>")
|
$("#jasmine-content").append $("<div class='editor'></div>")
|
||||||
|
|
||||||
afterEach ->
|
afterEach ->
|
||||||
theme.deactivate() for theme in themes
|
theme.deactivate()
|
||||||
|
|
||||||
describe "TextMateTheme", ->
|
describe "TextMateTheme", ->
|
||||||
it "applies the theme's stylesheet to the current window", ->
|
it "applies the theme's stylesheet to the current window", ->
|
||||||
expect($(".editor").css("background-color")).not.toBe("rgb(20, 20, 20)")
|
expect($(".editor").css("background-color")).not.toBe("rgb(20, 20, 20)")
|
||||||
|
|
||||||
themePath = require.resolve(fs.join('fixtures', 'test.tmTheme'))
|
themePath = require.resolve(fs.join('fixtures', 'test.tmTheme'))
|
||||||
themes = Theme.load(themePath)
|
theme = Theme.load(themePath)
|
||||||
expect($(".editor").css("background-color")).toBe("rgb(20, 20, 20)")
|
expect($(".editor").css("background-color")).toBe("rgb(20, 20, 20)")
|
||||||
|
|
||||||
describe "AtomTheme", ->
|
describe "AtomTheme", ->
|
||||||
@@ -26,7 +26,7 @@ describe "@load(name)", ->
|
|||||||
expect($(".editor").css("padding-bottom")).not.toBe("103px")
|
expect($(".editor").css("padding-bottom")).not.toBe("103px")
|
||||||
|
|
||||||
themePath = require.resolve(fs.join('fixtures', 'test-atom-theme'))
|
themePath = require.resolve(fs.join('fixtures', 'test-atom-theme'))
|
||||||
themes = Theme.load(themePath)
|
theme = Theme.load(themePath)
|
||||||
expect($(".editor").css("padding-top")).toBe("101px")
|
expect($(".editor").css("padding-top")).toBe("101px")
|
||||||
expect($(".editor").css("padding-right")).toBe("102px")
|
expect($(".editor").css("padding-right")).toBe("102px")
|
||||||
expect($(".editor").css("padding-bottom")).toBe("103px")
|
expect($(".editor").css("padding-bottom")).toBe("103px")
|
||||||
|
|||||||
Reference in New Issue
Block a user