aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngMock/angular-mocks.js
diff options
context:
space:
mode:
authorCaitlin Potter2014-02-06 14:02:18 +0000
committerPeter Bacon Darwin2014-02-16 19:03:40 +0000
commitf7d28cd377f06224247b950680517a187a7b6749 (patch)
tree20203b9f7bf60748bb752f325b1869415352a6f3 /src/ngMock/angular-mocks.js
parent2e641ac49f121a6e2cc70bd3879930b44a8a7710 (diff)
downloadangular.js-f7d28cd377f06224247b950680517a187a7b6749.tar.bz2
docs(all): convert <pre>/</pre> snippets to GFM snippets
Diffstat (limited to 'src/ngMock/angular-mocks.js')
-rw-r--r--src/ngMock/angular-mocks.js52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index 1c276f29..fe25254f 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -195,7 +195,7 @@ angular.mock.$Browser.prototype = {
* information.
*
*
- * <pre>
+ * ```js
* describe('$exceptionHandlerProvider', function() {
*
* it('should capture log messages and exceptions', function() {
@@ -216,7 +216,7 @@ angular.mock.$Browser.prototype = {
* });
* });
* });
- * </pre>
+ * ```
*/
angular.mock.$ExceptionHandlerProvider = function() {
@@ -327,10 +327,10 @@ angular.mock.$LogProvider = function() {
* Array of messages logged using {@link ngMock.$log#log}.
*
* @example
- * <pre>
+ * ```js
* $log.log('Some Log');
* var first = $log.log.logs.unshift();
- * </pre>
+ * ```
*/
$log.log.logs = [];
/**
@@ -341,10 +341,10 @@ angular.mock.$LogProvider = function() {
* Array of messages logged using {@link ngMock.$log#info}.
*
* @example
- * <pre>
+ * ```js
* $log.info('Some Info');
* var first = $log.info.logs.unshift();
- * </pre>
+ * ```
*/
$log.info.logs = [];
/**
@@ -355,10 +355,10 @@ angular.mock.$LogProvider = function() {
* Array of messages logged using {@link ngMock.$log#warn}.
*
* @example
- * <pre>
+ * ```js
* $log.warn('Some Warning');
* var first = $log.warn.logs.unshift();
- * </pre>
+ * ```
*/
$log.warn.logs = [];
/**
@@ -369,10 +369,10 @@ angular.mock.$LogProvider = function() {
* Array of messages logged using {@link ngMock.$log#error}.
*
* @example
- * <pre>
+ * ```js
* $log.error('Some Error');
* var first = $log.error.logs.unshift();
- * </pre>
+ * ```
*/
$log.error.logs = [];
/**
@@ -383,10 +383,10 @@ angular.mock.$LogProvider = function() {
* Array of messages logged using {@link ngMock.$log#debug}.
*
* @example
- * <pre>
+ * ```js
* $log.debug('Some Error');
* var first = $log.debug.logs.unshift();
- * </pre>
+ * ```
*/
$log.debug.logs = [];
};
@@ -606,7 +606,7 @@ function padNumber(num, digits, trim) {
* incomplete we might be missing some non-standard methods. This can result in errors like:
* "Date.prototype.foo called on incompatible Object".
*
- * <pre>
+ * ```js
* var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
* newYearInBratislava.getTimezoneOffset() => -60;
* newYearInBratislava.getFullYear() => 2010;
@@ -615,7 +615,7 @@ function padNumber(num, digits, trim) {
* newYearInBratislava.getHours() => 0;
* newYearInBratislava.getMinutes() => 0;
* newYearInBratislava.getSeconds() => 0;
- * </pre>
+ * ```
*
*/
angular.mock.TzDate = function (offset, timestamp) {
@@ -961,7 +961,7 @@ angular.mock.dump = function(object) {
* The following code shows how to setup and use the mock backend when unit testing a controller.
* First we create the controller under test:
*
- <pre>
+ ```js
// The controller code
function MyController($scope, $http) {
var authToken;
@@ -982,11 +982,11 @@ angular.mock.dump = function(object) {
});
};
}
- </pre>
+ ```
*
* Now we setup the mock backend and create the test specs:
*
- <pre>
+ ```js
// testing controller
describe('MyController', function() {
var $httpBackend, $rootScope, createController;
@@ -1052,7 +1052,7 @@ angular.mock.dump = function(object) {
$httpBackend.flush();
});
});
- </pre>
+ ```
*/
angular.mock.$HttpBackendProvider = function() {
this.$get = ['$rootScope', createHttpBackendMock];
@@ -1441,9 +1441,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
* Typically, you would call this method following each test case that asserts requests using an
* "afterEach" clause.
*
- * <pre>
+ * ```js
* afterEach($httpBackend.verifyNoOutstandingExpectation);
- * </pre>
+ * ```
*/
$httpBackend.verifyNoOutstandingExpectation = function() {
$rootScope.$digest();
@@ -1462,9 +1462,9 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
* Typically, you would call this method following each test case that asserts requests using an
* "afterEach" clause.
*
- * <pre>
+ * ```js
* afterEach($httpBackend.verifyNoOutstandingRequest);
- * </pre>
+ * ```
*/
$httpBackend.verifyNoOutstandingRequest = function() {
if (responses.length) {
@@ -1726,7 +1726,7 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
* To setup the application to run with this http backend, you have to create a module that depends
* on the `ngMockE2E` and your application modules and defines the fake backend:
*
- * <pre>
+ * ```js
* myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
* myAppDev.run(function($httpBackend) {
* phones = [{name: 'phone1'}, {name: 'phone2'}];
@@ -1741,7 +1741,7 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
* $httpBackend.whenGET(/^\/templates\//).passThrough();
* //...
* });
- * </pre>
+ * ```
*
* Afterwards, bootstrap your app with this new module.
*/
@@ -2010,7 +2010,7 @@ if(window.jasmine || window.mocha) {
*
* ## Example
* Example of what a typical jasmine tests looks like with the inject method.
- * <pre>
+ * ```js
*
* angular.module('myApplicationModule', [])
* .value('mode', 'app')
@@ -2044,7 +2044,7 @@ if(window.jasmine || window.mocha) {
* });
* });
*
- * </pre>
+ * ```
*
* @param {...Function} fns any number of functions which will be injected using the injector.
*/