This provides some initial development utilities for people using Node.
Instructions for installing:
npm install
After pulling down the dependencies, you can start a developement server that provides the libraries (ol and Closure Library) in debug mode (not minified/compiled). Run the dev server with the following:
npm start
Currently, the example index page needs to be built with `build.py`. After building that, you should be able to browse all static files, view the examples and run the tests.
51 lines
1.6 KiB
HTML
51 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>OL Spec Runner</title>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" type="text/css" href="mocha-1.8.1/mocha.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div id="mocha"></div>
|
|
|
|
<script type="text/javascript" src="jquery-1.9.1/jquery.min.js"></script>
|
|
<!-- Extended expect.js w/ various methods, see #374 for the differences to 0.2.0 -->
|
|
<script type="text/javascript" src="expect-0.2.0-ol3/expect.js"></script>
|
|
<script type="text/javascript" src="sinon-1.6.0/sinon.js"></script>
|
|
<script type="text/javascript" src="mocha-1.8.1/mocha.js"></script>
|
|
<script type="text/javascript" src="test-extensions.js"></script>
|
|
<script>
|
|
mocha.setup({
|
|
ui: 'bdd',
|
|
bail: false
|
|
});
|
|
</script>
|
|
<script type="text/javascript" src="../build/proj4js/lib/proj4js-combined.js"></script>
|
|
|
|
<!-- This script is provided by the debug server (start with `npm start`) -->
|
|
<script type="text/javascript" src="loader.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
/**
|
|
* The goog.dom.ViewportSizeMonitor (used in map.js) creates a global leak
|
|
* by setting goog.UID_PROPERTY_ on the monitored window. In order to test
|
|
* that we don't have other global leaks, we preemptively set the property
|
|
* so Mocha can compare the global before and after our tests.
|
|
*/
|
|
goog.getUid(this);
|
|
|
|
if (window.mochaPhantomJS) {
|
|
mochaPhantomJS.run();
|
|
} else {
|
|
mocha.run();
|
|
}
|
|
</script>
|
|
<!--
|
|
Tests should not depend on any specific markup and should instead create
|
|
whatever elements are needed (cleaning up when done).
|
|
-->
|
|
</body>
|
|
</html>
|