forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta] Change the Ember.View global to have a deprecation warn…
…ing on init * Use underscored env variable _ENABLE_LEGACY_VIEW_SUPPORT to remove deprecation. * Change tests that used the Ember.View global directly to import View from "ember-views/views/view" instead Refs emberjs#11377
- 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.