diff --git a/packages/ember-template-compiler/tests/plugins/assert-array-test.js b/packages/ember-template-compiler/tests/plugins/assert-array-test.js
index 0e6b13a5cd1..16ad9f56045 100644
--- a/packages/ember-template-compiler/tests/plugins/assert-array-test.js
+++ b/packages/ember-template-compiler/tests/plugins/assert-array-test.js
@@ -38,5 +38,23 @@ moduleFor(
this.assertHTML('
');
this.assertStableRerender();
}
+
+ ['@test survives undefined item with key'](assert) {
+ // Intentionally double all of the values to verify that this
+ // version of the `array` function is used.
+ function array(...values) {
+ return values.map((value) => value * 2);
+ }
+
+ let Root = defineComponent(
+ { array },
+ `{{#each (array undefined) key="anything" as |item|}}- {{item}}
{{/each}}
`
+ );
+ this.registerComponent('root', { ComponentClass: Root });
+
+ this.render('');
+ this.assertHTML('');
+ this.assertStableRerender();
+ }
}
);