emberjs / emberjs/ember.js

Test server crash

Open
#20,944 9 comments 0 reactions 0 assignees View on GitHub
Needs Submitter Response
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

---

### 🐞 Describe the Bug

When using **partial string interpolation inside a `style` attribute** (e.g. `style="border: 3px solid {{this.borderColor}}"`) inside an `{{#each}}` block, the test suite **hangs** and **CPU usage spikes to 100%**—but only during testing (`ember test --server`). This issue becomes **worse when multiple tests visit the same page repeatedly**, as each visit seems to increase memory or DOM processing load.

This issue **does not occur in the browser** and happens even if the bound values are static or never change.
(may be because the app doesn't render again and again such as tests)

---

### 🔬 Minimal Reproduction

Tested even in Ember’s official Super Rentals example.
https://github.com/ember-learn/super-rentals/tree/super-rentals-tutorial-output

Controller:

```js
export default class IndexController {
arrayOfNames = [
'apple white', 'aqua', 'aqua marine', 'bisque', 'black',
'blanched almond', 'blue', 'blue violet', 'brown', 'chocolate',
'crimson red', 'cyan', 'dark blue', 'dark cyan', 'dark green',
'fire brick', 'floral white', 'ghost white', 'grey', 'yellow green'
];

borderColor = 'red';
}
```

Template:

```hbs


    {{#each this.arrayOfNames as |name|}}
  • {{name}}

  • {{/each}}

```

Acceptance Test:

```js
module('Acceptance | repeated visit', function(hooks) {
setupApplicationTest(hooks);

test('checking all li elements are present', async function (assert) {
await visit('/');
assert.dom('li').exists({ count: 20 });
});

test('checking li element - apple white', async function (assert) {
await visit('/');
assert.dom('li').containsText('apple white');
});

test('checking li element - aqua', async function (assert) {
await visit('/');
assert.dom('li').containsText('aqua');
});

// ... similar tests for remaining items
});
```

Run using:

```bash
ember test --server
```

---

### 😕 Actual Behavior

* Test server hangs after several test cases.
* CPU usage spikes to 100%.
* Manual kill required (`Ctrl+C` may not respond).
* More repeated renders = faster hangs.

---

### 🤔 Expected Behavior

* CPU and memory usage should remain stable.
* Static style interpolations should not trigger test instability.

---

### 🌍 Environment

```json
{
"ember": "6.4.0",
"ember-cli": "~6.4.0",
"ember-qunit": "^9.0.2",
"node": "22.12.0",
"yarn": "1.22.10",
"os": "macOS 15.5 (Intel + M1 tested)",
"volta": {
"node": "22.12.0",
"yarn": "1.22.10"
}
}
```

---

### ➕ Additional Context

* Rewriting the style like this avoids the issue:

```hbs


  • ```

    Example:
    https://stackblitz.com/edit/github-yu36hthb?file=tests%2Facceptance%2Findex-test.js

    You can run `ember t -s` in this app to replicate this issue

    screen shot:

    Image

  • Contributor guide

    Open the contributing guide

    Assessment

    This issue has not been assessed yet.

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.