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
equal: function( actual, expected, message ) { | |
/*jshint eqeqeq:false */ | |
QUnit.push( expected == actual, actual, expected, message ); | |
}, | |
push: function( result, actual, expected, message ) { | |
if ( !config.current ) { | |
throw new Error( "assertion outside test context, was " + sourceFromStacktrace() ); | |
} |
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
deepEqual: function( actual, expected, message ) { | |
QUnit.push( QUnit.equiv(actual, expected), actual, expected, message ); | |
} | |
... | |
innerEquiv = function() { // can take multiple arguments | |
var args = [].slice.apply( arguments ); | |
if ( args.length < 2 ) { | |
return true; // end transition |
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
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD | |
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-css_positionsticky-load | |
*/ | |
;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1? |
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
describe('Directive tests: geolocation ', function() { | |
var $window, navigator; | |
describe('when called on a browser that has geolocation available ', function() { | |
beforeEach(module('geolocationApp')); | |
beforeEach(inject(function($rootScope, $compile, _$window_) { | |
element = angular.element('<geolocation class="geolocation"><p>This is a geolocation app</p></geolocation>'); |
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
describe('The success button', function(){ | |
var fixture; | |
beforeEach(function() { | |
setStyleFixtures('.btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c; }'); | |
fixture = setFixtures('<button type="button" class="btn btn-success">Success</button>'); | |
}); | |
it('should have a color of white', function() { | |
var successButton = fixture.find('.btn-success'); |
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
var app = angular.module("app",[]); | |
app.factory("customerService", function () { | |
app.factory("customerService", function () { | |
var customers = [ | |
{ | |
firstname: "Joe", | |
lastname: "Bloggs" | |
}, |
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
function Logger() {} | |
Logger.prototype.log = function(message) { | |
console.log('Logger: ' + message) | |
}; | |
function AppLogger() { | |
Logger.call(this); | |
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
app.factory("newsService", function() { | |
var hewsHeadlines = [ | |
{ | |
title: 'Big Scandal' | |
}, | |
{ | |
title: 'Small Heatwave' | |
} | |
]; |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>This is a Sample Page</title> | |
<link href="allstateni-1.0.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<h1>Truncate Example</h1> |
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
(function ($) { | |
$.fn.truncate = function (options) { | |
var defaults = { | |
length: 300, | |
minTrail: 20, | |
moreText: "more", | |
lessText: "less", | |
ellipsisText: "..." | |
}; |
OlderNewer