-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11387 from bantic/deprecate-ember-view-global
[BUGFIX beta] Change the Ember.View global to have a deprecation warning on init
- Loading branch information
Showing
11 changed files
with
75 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
import Ember from "ember-views"; | ||
|
||
QUnit.module("ember-view exports"); | ||
let originalSupport; | ||
|
||
QUnit.test("should export a disabled CoreView", function() { | ||
QUnit.module("ember-view exports", { | ||
setup() { | ||
originalSupport = Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT; | ||
}, | ||
teardown() { | ||
Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT = originalSupport; | ||
} | ||
}); | ||
|
||
QUnit.test("should export a deprecated CoreView", function() { | ||
expectDeprecation(function() { | ||
Ember.CoreView.create(); | ||
}, 'Ember.CoreView is deprecated. Please use Ember.View.'); | ||
}); | ||
|
||
QUnit.test("should export a deprecated View", function() { | ||
expectDeprecation(function() { | ||
Ember.View.create(); | ||
}, /Ember.View is deprecated/); | ||
}); | ||
|
||
QUnit.test("when legacy view support is enabled, Ember.View does not have deprecation", function() { | ||
Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT = true; | ||
|
||
expectNoDeprecation(function() { | ||
Ember.View.create(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.