-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting same properties name causing tests fail #430
Comments
@brunoocasali what version of ember-source do you see this on? |
@efx I'm using the latest canary :) Exactly the same version that breaks in the CI |
I can confirm this, seeing it with Ember 3.13! |
I've found out that setting the property without beforeEach(function() {
this.text = 'my awesome but very large text!!';
});
it('does truncate text when is greater than limit', async function() {
await render(hbs`{{truncate-text this.text limit=10}}`);
expect(this.element.textContent).to.be.include('my awesome...');
});
it('does not truncate text when lower than limit', async function() {
await render(hbs`{{truncate-text this.text limit=100}}`);
expect(this.element.textContent).to.be.include('my awesome but very large text!!');
}); |
FWIW, I have verified this doesn't happen in ember-qunit's |
Should be fixed now thanks to @kobsy? |
Hello everyone!
After digging into an annoying problem I discovered what is causing the bugs in valid tests...
I think after we use a property name this name is invalid to be used again...
This is the helper code:
This is my helper test:
If I remove the
beforeEach
, and pass the same property directly the problem still happensThis is the error:

Logging the properties, we got the
"my awesome but very large text!!"
for the first occurrence andundefined
for the second.If I change the name of the last property from
text
tosomething
it works!I've provided a little package with the failing specs: https://github.com/brunoocasali/bookish-octo-garbanzo/blob/master/tests/integration/helpers/truncate-text-test.js
The text was updated successfully, but these errors were encountered: