mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Include deprecated APIs when running core specs
This commit is contained in:
@@ -75,7 +75,8 @@ var setupWindow = function(loadSettings) {
|
||||
ModuleCache.register(loadSettings);
|
||||
ModuleCache.add(loadSettings.resourcePath);
|
||||
|
||||
require('grim').includeDeprecatedAPIs = false;
|
||||
// Only include deprecated APIs when running core spec
|
||||
require('grim').includeDeprecatedAPIs = isRunningCoreSpecs(loadSettings);
|
||||
|
||||
// Start the crash reporter before anything else.
|
||||
require('crash-reporter').start({
|
||||
@@ -219,6 +220,14 @@ var setupWindowBackground = function() {
|
||||
}, false);
|
||||
}
|
||||
|
||||
var isRunningCoreSpecs = function(loadSettings) {
|
||||
return !!(loadSettings &&
|
||||
loadSettings.isSpec &&
|
||||
loadSettings.specDirectory &&
|
||||
loadSettings.resourcePath &&
|
||||
path.dirname(loadSettings.specDirectory) === loadSettings.resourcePath);
|
||||
}
|
||||
|
||||
parseLoadSettings();
|
||||
setupWindowBackground();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user