tethys-feature-service/node_modules/proj4/test/amd.html
2023-10-02 15:04:02 +02:00

64 lines
1.5 KiB
HTML

<html>
<head>
<meta charset="utf-8">
<title>Mocha Tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
</head>
<body>
<script src="../node_modules/mocha/mocha.js"></script>
<div id="mocha"></div>
<script src="../node_modules/curl-amd/src/curl.js"></script>
<script src="test.js"></script>
<script>
curl.config({
//By default load any module IDs from js/lib
waitSeconds:15,
use: {
mocha: {
attach: 'mocha'
},
mochaPhantomJS: {
attach: 'mochaPhantomJS'
},
testPoints: {
attach: 'testPoints'
},
aWKT: {
attach: 'aWKT'
}
},packages: [
{
name: 'proj4',
location: '../dist',
main: 'proj4-src.js',
config: { moduleLoader: '../node_modules/curl-amd/src/curl/loader/cjsm11' } /* <-- hey! */
},
{
name:'mgrs',
location:'../node_modules/mgrs',
main:'mgrs.js',
config: { moduleLoader: '../node_modules/curl-amd/src/curl/loader/cjsm11' } /* <-- hey! */
}
]
});
mocha.setup({
ui: "bdd",
globals: ["console"],
timeout: 300000,
ignoreLeaks: true
});
curl(['../node_modules/chai/chai.js', 'proj4','testData']).then(startTests).then(function(){
if (window.mochaPhantomJS) {
window.mochaPhantomJS.run();
} else {
window.mocha.run();
}
});
</script>
</body>
</html>