mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Don't allow specs that call deprecated methods to pass
This commit is contained in:
parent
fd7951b2c6
commit
1083136dec
@ -6,6 +6,7 @@ require '../vendor/jasmine-jquery'
|
||||
path = require 'path'
|
||||
_ = require 'underscore-plus'
|
||||
fs = require 'fs-plus'
|
||||
Grim = require 'grim'
|
||||
KeymapManager = require '../src/keymap-extensions'
|
||||
{$, WorkspaceView, Workspace} = require 'atom'
|
||||
Config = require '../src/config'
|
||||
@ -47,6 +48,7 @@ if specDirectory
|
||||
specProjectPath = path.join(specDirectory, 'fixtures')
|
||||
|
||||
beforeEach ->
|
||||
Grim.clearDeprecations()
|
||||
$.fx.off = true
|
||||
projectPath = specProjectPath ? path.join(@specDirectory, 'fixtures')
|
||||
atom.project = new Project(path: projectPath)
|
||||
@ -123,6 +125,14 @@ afterEach ->
|
||||
jasmine.unspy(atom, 'saveSync')
|
||||
ensureNoPathSubscriptions()
|
||||
atom.syntax.off()
|
||||
deprecations = Grim.getDeprecations()
|
||||
if deprecations.length > 0
|
||||
for deprecation in deprecations
|
||||
console.log deprecation
|
||||
for stack in deprecations.stacks
|
||||
console.log stack
|
||||
throw new Error("#{deprecations.length} deprecated methods were called.")
|
||||
|
||||
waits(0) # yield to ui thread to make screen update more frequently
|
||||
|
||||
ensureNoPathSubscriptions = ->
|
||||
|
Loading…
Reference in New Issue
Block a user