Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed Apr 29, 2015
1 parent 50ed88c commit d77a5d0
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 108 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Expand Up @@ -85,7 +85,7 @@ module.exports = function(grunt) {
src: 'src/**/*.js'
},
test: {
src: 'test/**/*.js'
src: ['test/**/*.js', 'libs/jquery-loader.js']
},
options: {
jshintrc: '.jshintrc'
Expand All @@ -100,7 +100,7 @@ module.exports = function(grunt) {
src: 'src/**/*.js'
},
test: {
src: 'test/**/*.js'
src: ['test/**/*.js', 'libs/jquery-loader.js']
}
},

Expand Down
14 changes: 9 additions & 5 deletions libs/jquery-loader.js
@@ -1,8 +1,12 @@
(function () {
!(function() {

// Get any lib=___ param from the query string.
var library = location.search.match(/[?&]lib=(.*?)(?=&|$)/);

document.write("<script src='../libs/" + library[1] + "'></script>");
// Get any lib=___ param from the query string.
var library = location.search.match(/[?&]lib=(.*?)(?=&|$)/);

/* jshint -W060 */
if (library) {
document.write('<script src="../libs/' + library[1] + '"></script>');
} else {
document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>');
}
}());
20 changes: 11 additions & 9 deletions test/remodal.html
Expand Up @@ -3,25 +3,27 @@
<head>
<meta charset="utf-8">
<title>Remodal Test Suite</title>

<!-- Load local jQuery -->
<script src="../libs/jquery-loader.js"></script>

<!-- Load local QUnit -->
<link rel="stylesheet" href="../libs/qunit/qunit/qunit.css" media="screen">
<script src="../libs/qunit/qunit/qunit.js"></script>

<!-- Load local lib and tests -->
<link rel="stylesheet" href="../src/jquery.remodal.css">
<script src="../src/jquery.remodal.js"></script>
<script src="remodal_test.js"></script>
<style>
.remodal-overlay {
-webkit-transition: opacity 0.25s 0.05s linear;
-moz-transition: opacity 0.25s 0.05s linear;
-o-transition: opacity 0.25s 0.05s linear;
transition: opacity 0.25s 0.05s linear;
}
.remodal-overlay.remodal-is-opening,
.remodal-overlay.remodal-is-closing,
.remodal.remodal-is-opening,
.remodal.remodal-is-closing,
.remodal-bg.remodal-is-opening,
.remodal-bg.remodal-is-closing {
animation: none;
}
</style>
</head>
<body>
Expand Down

0 comments on commit d77a5d0

Please sign in to comment.