-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Conversation
This PR is big and given that it changes many files, can get easily rotten, so it would be ideal if this can be reviewed fast. |
There is a pending task to upgrade grunt-ddescribe-iit to support for |
I do not have access to IE9, can someone check why there is an error when running |
@lgalfaso The complete log shows an error for FIrefox in tests:modules:
IE 9 is fine:
|
Why was lgalfaso@7e91645 reverted? Because we don't support these browsers? |
Jasmine 2.4 |
Ok, thanks. Can you add that explanation to the commit message? |
['$filterProvider', 'register', createArgumentsOf(['f', 'ff'])], | ||
['$compileProvider', 'directive', createArgumentsOf(['d', 'dd'])], | ||
['$compileProvider', 'component', createArgumentsOf(['c', 'cc'])], | ||
['$controllerProvider', 'register', createArgumentsOf(['ctrl', 'ccc'])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to just use jasmine.objectContaining
for these tests?
@lgalfaso can you confirm that after the change to the angular mock module tests still work on PhantomJS and Safari 7? This is the only part that affects people outside of this project so it would be good to make sure we are not breaking anything. |
Highlights: New mechanism to run async tests as Jasmine 2 removed `runs`, `waits` and `waitsFor` The functions `iit`, `ddescribe` and `tthey` were renamed `fit`, `fdescribe` and `fthey` as the originals came from Karma, Karma no longer bundles Jasmine and the new function name comes from Jasmine
Reverted the changes on angular.mocks.js, made the changes on loaderSpec.js, fixed the issue with Firefox and now the test are back to green. PTAL |
@@ -9,7 +9,7 @@ describe('private mocks', function() { | |||
spyOn(window, 'it'); | |||
|
|||
they('should do stuff with $prop', ['a', 'b', 'c']); | |||
expect(window.it.calls.length).toEqual(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these could be converted instead to .calls.count()).toEqual(...
This would make it similar to what is was before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think the new way is better and the way that is present in Jasmine documentation
Since we now officially move to jasmine 2.4, I think we should also change the docs to recommend jasmine 2.4 instead of 1.3, espepcially here: https://github.com/angular/angular.js/blob/a4e60cb6970d8b6fa9e0af4b9f881ee3ba7fdc99/docs/content/guide/unit-testing.ngdoc and https://github.com/angular/angular.js/blob/a4e60cb6970d8b6fa9e0af4b9f881ee3ba7fdc99/docs/content/guide/e2e-testing.ngdoc The unit tests in the guide don't actually run, so they have to be checked for correctness with jasmine 2.4. @lgalfaso do you want to make these changes? I can also do it if you want. |
Updated the docs, did not run the tests in the guide, but in theory it On Tue, Mar 15, 2016 at 1:43 PM, Martin Staffa [email protected]
|
Highlights: New mechanism to run async tests as Jasmine 2 removed `runs`, `waits` and `waitsFor` The functions `iit`, `ddescribe` and `tthey` were renamed `fit`, `fdescribe` and `fthey` as the originals came from Karma, Karma no longer bundles Jasmine and the new function name comes from Jasmine. Closes #14226
Highlights: New mechanism to run async tests as Jasmine 2 removed `runs`, `waits` and `waitsFor` The functions `iit`, `ddescribe` and `tthey` were renamed `fit`, `fdescribe` and `fthey` as the originals came from Karma, Karma no longer bundles Jasmine and the new function name comes from Jasmine. Closes #14226
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Chore
What is the current behavior? (You can also link to an open issue here)
All tests run with Jasmine 1.3
What is the new behavior (if this is a feature change)?
All tests run with Jasmine 2.4
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
Highlights:
in Jasmine,
this
is no longer jasmine.Spec. Removed the tests that check this.New mechanism to run async tests as Jasmine 2 removed
runs
,waits
andwaitsFor
The functions
iit
,ddescribe
andtthey
were renamedfit
,fdescribe
andfthey
as the originals came from Karma, Karma no longer bundles Jasmine and the new function
name comes from Jasmine
7e91645 was partially reverted. Kept the test, remove the code changes