Skip to content

Commit

Permalink
Merge pull request #18782 from emberjs/test-edition-properly
Browse files Browse the repository at this point in the history
Ensure the test suite runs with Octane's set of optional features.
  • Loading branch information
rwjblue authored Mar 11, 2020
2 parents 51acff4 + 2f817cc commit 830fb0a
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 199 deletions.
2 changes: 2 additions & 0 deletions bin/run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function generateTestsFor(packageName) {
}

testFunctions.push(() => run('package=' + packageName));
testFunctions.push(() => run('package=' + packageName + '&edition=classic'));
testFunctions.push(() => run('package=' + packageName + '&prebuilt=true'));
testFunctions.push(() => run('package=' + packageName + '&enableoptionalfeatures=true'));

Expand All @@ -84,6 +85,7 @@ function generateEachPackageTests() {

function generateStandardTests() {
testFunctions.push(() => run(''));
testFunctions.push(() => run('edition=classic'));
testFunctions.push(() => run('enableoptionalfeatures=true'));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,9 @@ if (ENV._DEBUG_RENDER_TREE) {
args: { positional: [], named: {} },
instance: undefined,
template: outlet,
bounds: this.nodeBounds(this.element),
bounds: ENV._APPLICATION_TEMPLATE_WRAPPER
? this.nodeBounds(this.element)
: this.elementBounds(this.element),
children: [
this.outlet({
type: 'route-template',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,19 @@ moduleFor(
async ['@feature(!EMBER_ROUTING_MODEL_ARG) it emits a useful backtracking re-render assertion message'](
assert
) {
// When application-template-wrapper optional feature is set to `false`
// (and therefore does not add a wrapping `<div>` for the application
// template) throwing during component `constructor`/`init` causes
// follow-on errors when the ApplicationInstance instance is destroyed
// (when the render roots are being cleared).
//
// TODO: remove this guard, and fix the associated failures when clearing
// on application instance instance destruction
if (!ENV._APPLICATION_TEMPLATE_WRAPPER) {
assert.expect(0);
return;
}

this.router.map(function() {
this.route('routeWithError');
});
Expand Down Expand Up @@ -1027,6 +1040,19 @@ moduleFor(
async ['@feature(EMBER_ROUTING_MODEL_ARG) it emits a useful backtracking re-render assertion message'](
assert
) {
// When application-template-wrapper optional feature is set to `false`
// (and therefore does not add a wrapping `<div>` for the application
// template) throwing during component `constructor`/`init` causes
// follow-on errors when the ApplicationInstance instance is destroyed
// (when the render roots are being cleared).
//
// TODO: remove this guard, and fix the associated failures when clearing
// on application instance instance destruction
if (!ENV._APPLICATION_TEMPLATE_WRAPPER) {
assert.expect(0);
return;
}

this.router.map(function() {
this.route('routeWithError');
});
Expand Down
Loading

0 comments on commit 830fb0a

Please sign in to comment.