ember-cli / ember-cli/ember-exam

Some tests fail using --split option while using ember-i18n

Open
#100 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
289
Forks
65
Avg merge
4m
Merged PRs (30d)
9

Description

Hi there,
We've been using ember-exam in our project for a while, and it's worked great. However, recently we also began using `ember-i18n` and have noticed that some of our tests began to fail with the following message: `Error: Assertion Failed: I18n: Cannot translate when locale is null`.

We usually split our tests into 5 partitions and I can reliably reproduce these failures on partitions 1 and 3. Running the tests **without** the `--split` command causes all of the tests to pass.

We configure the default locale for i18n in our `config/environment.js` file. We also use `testem`, and our `testem.json` file is as follows:

```
{
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"phantomjs_debug_port": 5001,
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
],
"proxies": {
"/api": {
"port": 3000,
"host": "localhost"
},
"/users": {
"port": 3000,
"host": "localhost"
}
}
}

```

I wanted to report this here in case it's buggy behavior, but I was also hoping to see if we can diagnose and fix the issue without needing a bugfix. How does `--split` work? What does the process under the hood look like compared to running tests without the `--split` option? It seems like maybe what's going on is that our configuration options aren't "taking" to each partition, but that's just a shot in the dark since I don't know exactly how `--split` works.

We are running the following software versions:

ember-cli: 2.7.0
node: 7.9.0
os: darwin x64

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.