You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky Cannot assign to read only property 'owner' of object '#<Context>' #561
Cannot assign to read only property 'owner' of object '#<Context>'
I'm upgrading test suit from ember-cli-mocha to ember-mocha 0.15.1 and get randomly failing tests all over again and those tests look fine when I'm running them separately. Is there a way to find out what's causing this error?
Mentioned error appears because of some tests being started before the previous one is finished, which results in tests getting wrong originalContext and not being able to clean it up properly. Is my assumption correct? Any ideas how can I debug this further?
beforeEach(function(){originalContext=_assign({},this);console.group(`${originalContext.test.parent.title} => ${originalContext.currentTest.title}`);returnsetupContext(this,options).then(()=>setupPauseTest(this)).then(()=>chainHooks(beforeEachHooks,this));});afterEach(function(){returnchainHooks(afterEachHooks,this).then(()=>teardownContext(this)).then(()=>{// delete any extraneous propertiesfor(letkeyinthis){if(!(keyinoriginalContext)){console.log("key to delete :>> ",key);deletethis[key];}}// copy over the original values_assign(this,originalContext);}).catch((error)=>{console.log("this :>> ",this);console.log("originalContext :>> ",originalContext);console.error(error);}).finally(()=>{console.groupEnd();});});
Activity
rreckonerr commentedon May 14, 2020
Mentioned error appears because of some tests being started before the previous one is finished, which results in tests getting wrong originalContext and not being able to clean it up properly. Is my assumption correct? Any ideas how can I debug this further?
Example in the screenshot is failing randomly.
notchris commentedon Jun 3, 2021
Can confirm this issue occurs