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 }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
I'm unit testing my directive and in my unit test I only have
var scope = $rootScope.$new(),
element = angular.element('<my-foo></my-foo>');
element = $compile(element)(scope);
scope.$digest();
expect(element.scope()).toBeDefined();
This test fails :( To reproduce this I have created a small angular project here on github, with only 1 directive and only one unit test. To reproduce do
I was able to fix this test by doing one the following
In the directive add to the 'link' function
$element.data('$scope', $scope);
or change 'replace' into
replace: false
remove jquery from karma.conf.js
It doesn't make any sense, but it demonstrates that this situation is weird (I think). Can someone comment on this, because after many hours of tweaking I start to think that I have hit a bug here!
The text was updated successfully, but these errors were encountered:
I'm unit testing my directive and in my unit test I only have
This test fails :( To reproduce this I have created a small angular project here on github, with only 1 directive and only one unit test. To reproduce do
I was able to fix this test by doing one the following
It doesn't make any sense, but it demonstrates that this situation is weird (I think). Can someone comment on this, because after many hours of tweaking I start to think that I have hit a bug here!
The text was updated successfully, but these errors were encountered: