Skip to content

Commit 6d41e76

Browse files
committed
Merge pull request emberjs#3425 from rjackson/test_with_feature_flags
Test with all feature flags enabled.
2 parents d034d11 + 3159f3c commit 6d41e76

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

ember-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ testing_suites:
1111
standard:
1212
- "EACH_PACKAGE"
1313
- "package=all&jquery=1.7.2&nojshint=true"
14+
- "package=all&jquery=1.7.2&nojshint=true&enableallfeatures=true"
1415
- "package=all&extendprototypes=true&nojshint=true"
16+
- "package=all&extendprototypes=true&nojshint=true&enableallfeatures=true"
1517
- "package=all&skipPackage=container&dist=build&nojshint=true" # container isn't publicly available in the built version
18+
- "package=all&skipPackage=container&dist=build&nojshint=true&enableallfeatures=true" # container isn't publicly available in the built version
1619
all:
1720
- "EACH_PACKAGE"
1821
- "package=all&jquery=1.7.2&nojshint=true"

packages/ember-metal/lib/core.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,15 @@ Ember.FEATURES = {};
9090
Test that a feature is enabled. Parsed by Ember's build tools to leave
9191
experimental features out of beta/stable builds.
9292
93+
You can define an `ENV.ENABLE_ALL_FEATURES` config to force all features to
94+
be enabled.
95+
9396
@method isEnabled
9497
@param {string} feature
9598
*/
9699

97100
Ember.FEATURES.isEnabled = function(feature) {
98-
return Ember.FEATURES[feature];
101+
return Ember.ENV.ENABLE_ALL_FEATURES || Ember.FEATURES[feature];
99102
};
100103

101104
// ..........................................................

tests/ember_configuration.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@
1515
});
1616

1717
// Handle extending prototypes
18-
QUnit.config.urlConfig.push('extendprototypes');
19-
20-
var extendPrototypes = QUnit.urlParams.extendprototypes;
18+
QUnit.config.urlConfig.push({ id: 'extendprototypes', label: 'Extend Prototypes'});
19+
var extendPrototypes = QUnit.urlParams.extendprototypes;
2120
ENV['EXTEND_PROTOTYPES'] = !!extendPrototypes;
2221

22+
// Handle testing feature flags
23+
QUnit.config.urlConfig.push({ id: 'enableallfeatures', label: "Enable All Features"});
24+
var enableAllFeatures = QUnit.urlParams.enableallfeatures;
25+
ENV['ENABLE_ALL_FEATURES'] = !!enableAllFeatures;
26+
2327
// Don't worry about jQuery version
2428
ENV['FORCE_JQUERY'] = true;
2529

0 commit comments

Comments
 (0)