Merge pull request #6275 from atom/ks-report-core-deprecations-in-specs

Report core deprecations in specs
This commit is contained in:
Kevin Sawicki
2015-04-06 16:49:11 -07:00
3 changed files with 6 additions and 3 deletions

View File

@@ -221,7 +221,7 @@ describe "Project", ->
beforeEach ->
absolutePath = require.resolve('./fixtures/dir/a')
newBufferHandler = jasmine.createSpy('newBufferHandler')
atom.project.on 'buffer-created', newBufferHandler
atom.project.onDidAddBuffer(newBufferHandler)
describe "when given an absolute path that isn't currently open", ->
it "returns a new edit session for the given path and emits 'buffer-created'", ->
@@ -502,8 +502,12 @@ describe "Project", ->
describe ".eachBuffer(callback)", ->
beforeEach ->
jasmine.snapshotDeprecations()
atom.project.bufferForPathSync('a')
afterEach ->
jasmine.restoreDeprecationsSnapshot()
it "invokes the callback for existing buffer", ->
count = 0
count = 0

View File

@@ -72,7 +72,6 @@ if specDirectory
isCoreSpec = specDirectory == fs.realpathSync(__dirname)
beforeEach ->
Grim.clearDeprecations() if isCoreSpec
$.fx.off = true
documentTitle = null
projectPath = specProjectPath ? path.join(@specDirectory, 'fixtures')

View File

@@ -728,7 +728,7 @@ describe "TextEditorComponent", ->
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate(#{10 * charWidth}px, #{4 * lineHeightInPixels}px)"
expect(cursorNodes[1].style['-webkit-transform']).toBe "translate(#{11 * charWidth}px, #{8 * lineHeightInPixels}px)"
wrapperView.on 'cursor:moved', cursorMovedListener = jasmine.createSpy('cursorMovedListener')
editor.onDidChangeCursorPosition cursorMovedListener = jasmine.createSpy('cursorMovedListener')
cursor3.setScreenPosition([4, 11], autoscroll: false)
nextAnimationFrame()
expect(cursorNodes[0].style['-webkit-transform']).toBe "translate(#{11 * charWidth}px, #{4 * lineHeightInPixels}px)"