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
So awhile ago I tried to upgrade from 2.16 to 3.4 and got unit tests basically running but not working. However being an active application, we had to abandon the upgrade and get "real" work done (yes I quoted real because to me as a developer getting up to the latest version is as important as new features but I lost that battle). So now after a security review they are asking us to upgrade from 2.16 to 3.25 of Ember when we can.
So the branch for 3.4 runs the test. 3.25.1 was not running the tests suites. I think I figured that out as I had both ember-mocha and mocha somehow installed. Once I removed mocha from package.json I see at least two tests running however I keep getting an error.
ReferenceError: global is not defined
So originally this was triggered because we were trying to load fixtures data and we had a system that could select a user and return different data. Example: US user -> returns data for the US and German user -> returns data for Germany. We put the users on the global because it was shared with the sandbox that we use for local testing since this app is meant to be used in an iFrame for our other applications. I fixed that by just removing the global instance and the users in the sandbox and the fixtures which is not ideal but I will fix that up later.
However we use sinon sandbox for our tests and we have a simple helper that sets that up for us:
And this is resulting in this error. I am using ember-auto-import and I found some issues on line that said they added a global: true to the node to fix it in the application so I did that:
So awhile ago I tried to upgrade from 2.16 to 3.4 and got unit tests basically running but not working. However being an active application, we had to abandon the upgrade and get "real" work done (yes I quoted real because to me as a developer getting up to the latest version is as important as new features but I lost that battle). So now after a security review they are asking us to upgrade from 2.16 to 3.25 of Ember when we can.
So the branch for 3.4 runs the test. 3.25.1 was not running the tests suites. I think I figured that out as I had both ember-mocha and mocha somehow installed. Once I removed mocha from package.json I see at least two tests running however I keep getting an error.
ReferenceError: global is not defined
So originally this was triggered because we were trying to load fixtures data and we had a system that could select a user and return different data. Example: US user -> returns data for the US and German user -> returns data for Germany. We put the users on the global because it was shared with the sandbox that we use for local testing since this app is meant to be used in an iFrame for our other applications. I fixed that by just removing the global instance and the users in the sandbox and the fixtures which is not ideal but I will fix that up later.
However we use sinon sandbox for our tests and we have a simple helper that sets that up for us:
And this is resulting in this error. I am using
ember-auto-import
and I found some issues on line that said they added a global: true to the node to fix it in the application so I did that:I still get the error. Any ideas?
The text was updated successfully, but these errors were encountered: