This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(tests): performance improvements and fixes to jasmine testing #2800
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactor internal test utils to angular-material-spec.js Publish material mocks `angular-material-mocks.js` to work with angular-mocks.js for 3rd party unit testing. Removed module wrappers around all components - now only has a single module wrapper protecting all the angular material code Replaced use of `Function.bind( )` with `angular.bind()` Fixed tests runs with uncompiled source **or** compiled, deployed `angular-material.js` Use angular-material-mocks.js to decorate $$rAF.throttle(), force $mdAria.expectWithText() to be synchronous, and disable the generation of Theme CSS rules. Major testing speed improvements by disabling Theme CSS generation. Theme improvements: test existence of Theme CSS rule before regenerating. Now works with Safari, Firefox, PhantomJS, and Chrome browser testing.
ThomasBurleson
added
the
in progress
Mainly for in progress PRs, but may be used for issues that require multiple PRs
label
May 11, 2015
@rschmukler, @jelbourn - Can you guys reviews these changes:
All work very fast now: < 3secs. Note use of new source directory: |
ThomasBurleson
force-pushed
the
wip/jasmine-test-fixes
branch
from
May 11, 2015 02:11
763cfe4
to
3a256fb
Compare
Running karma on ci was not exiting with non zero code, giving the impression the specs passed Closes #2535.
I am working to fix the injection errors for minified source. |
ThomasBurleson
removed
the
in progress
Mainly for in progress PRs, but may be used for issues that require multiple PRs
label
May 11, 2015
-1 for the +10 for everything else 😄 |
Restored module wrapper to material theme constants. Passed global args to module wrapper for JS modules Minified code no longer contains angular-material-mocks; which is not deployed as external file.
ThomasBurleson
added
the
in progress
Mainly for in progress PRs, but may be used for issues that require multiple PRs
label
May 11, 2015
@gkalpak - since Angular uses 'ng' and 'ngMock', we wanted something analogous: 'ngMaterial', 'ngMaterial-mock'. What about 'ngMock-material' ? |
}); | ||
} | ||
}, | ||
flags: ['--web-security=no', '--proxy-type=none', '--remote-debugger-port=9000', '--remote-debugger-autorun=yes'] |
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.
Can you multi-line this array?
Auto-wrap all JS files in module wrapper. Repackage angular-material-mocks.js to `/test/` directory Change karma logLevel to 'warn'
ThomasBurleson
removed
in progress
Mainly for in progress PRs, but may be used for issues that require multiple PRs
wip
labels
May 11, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing now works with Safari, Firefox, PhantomJS, and Chrome browser testing.:
Function.bind( )
withangular.bind()
angular-material.js
angular-material-spec.js
angular-material-mocks.js
to work withangular-mocks.js
for 3rd party unit testing.angular-material-mocks.js
to decorate $$rAF.throttle(), force $mdAria.expectWithText() to be synchronous, and disable the generation of Theme CSS rules.