Skip to content

Commit

Permalink
refurbish jasmine tests and get them running again
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Jul 3, 2012
1 parent b193514 commit 8c1e7e1
Show file tree
Hide file tree
Showing 11 changed files with 3,305 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/JBrowse/Store/LazyArray.js
@@ -1,4 +1,4 @@
define(['JBrowse/Util','JBrowse/Finisher'], function( Util, Finisher ) {
define(['JBrowse/Util','JBrowse/Finisher','dojo/_base/xhr'], function( Util, Finisher, xhr ) {

/*
* For a JSON array that gets too large to load in one go, this class
Expand Down Expand Up @@ -79,11 +79,11 @@ LazyArray.prototype.range = function(start, end, callback, postFun, param) {
} else {
// start loading chunk
this.toProcess[chunk] = [toProcessInfo];
var url = this.urlTemplate.replace(/\{Chunk\}/g, chunk);
var url = this.urlTemplate.replace(/\{Chunk\}/gi, chunk);
var thisObj = this;
dojo.xhrGet(
{
url: Util.resolveUrl(this.baseUrl, url),
url: this.baseUrl ? Util.resolveUrl(this.baseUrl, url) : url,
handleAs: "json",
load: this._makeLoadFun(chunk),
error: function() { finish.dec(); }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
51 changes: 51 additions & 0 deletions tests/js_tests/index.html
@@ -0,0 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Jasmine Spec Runner</title>

<link rel="shortcut icon" type="image/png" href="lib/jasmine-1.2.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="lib/jasmine-1.2.0/jasmine.css">
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine.js"></script>
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine-html.js"></script>

<!-- include source files here... -->
<script type="text/javascript" src="../../src/dojo/dojo.js" data-dojo-config="isDebug: 0, async: 1" ></script>

<!-- include spec files here... -->
<script type="text/javascript" src="spec/LazyArray.spec.js"></script>

<script type="text/javascript">
(function() {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;

var htmlReporter = new jasmine.HtmlReporter();

jasmineEnv.addReporter(htmlReporter);

jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};

var currentWindowOnload = window.onload;

window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
execJasmine();
};

function execJasmine() {
jasmineEnv.execute();
}

})();
</script>

</head>

<body>
</body>
</html>
20 changes: 20 additions & 0 deletions tests/js_tests/lib/jasmine-1.2.0/MIT.LICENSE
@@ -0,0 +1,20 @@
Copyright (c) 2008-2011 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit 8c1e7e1

Please sign in to comment.