From 17dfeaa431f3fd6e530bc9a86b5c5cb418b22bd5 Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@tiolive.com> Date: Tue, 6 Aug 2013 14:55:05 +0200 Subject: [PATCH] tests.html added, a test page using requirejs --- test/jiotests.html | 20 -------------------- test/tests.html | 13 +++++++++++++ test/tests.require.js | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 20 deletions(-) delete mode 100644 test/jiotests.html create mode 100644 test/tests.html create mode 100644 test/tests.require.js diff --git a/test/jiotests.html b/test/jiotests.html deleted file mode 100644 index 163bea2..0000000 --- a/test/jiotests.html +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <title>JIO QUnit/Sinon Test</title> - <link rel="stylesheet" href="../lib/qunit/qunit.css" /> -</head> -<body> - <div id="qunit"></div> - <script type="text/javascript" src="../lib/qunit/qunit.js"></script> - <script type="text/javascript" src="../lib/sinon/sinon.js"></script> - <script type="text/javascript" src="../lib/sinon/sinon-qunit.js"></script> - <script type="text/javascript"> - <!-- -var require = {}; // IE compatibility - //--> - </script> - <script data-main="jiotests" src="../lib/require/require.js"></script> -</body> -</html> diff --git a/test/tests.html b/test/tests.html new file mode 100644 index 0000000..fc60b99 --- /dev/null +++ b/test/tests.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8" /> + <title>JIO, Storages and ComplexQueries QUnit/Sinon Tests</title> + <link rel="stylesheet" href="../lib/qunit/qunit.css" /> + <script data-main="tests.require.js" src="../lib/require/require.js"> + </script> +</head> +<body> + <div id="qunit"></div> +</body> +</html> diff --git a/test/tests.require.js b/test/tests.require.js new file mode 100644 index 0000000..54f8249 --- /dev/null +++ b/test/tests.require.js @@ -0,0 +1,34 @@ +/*jslint indent: 2, maxlen: 80 */ +/*global require */ + +(function () { + "use strict"; + + require.config({ + "paths": { + "md5": "../lib/md5/md5", + "complex_queries": "../complex_queries", + "jio": "../jio", + "jio_tests": "jio/tests", + "localstorage": "../src/jio.storage/localstorage", + "localstorage_tests": "jio.storage/localstorage.tests", + + "qunit": "../lib/qunit/qunit", + "sinon": "../lib/sinon/sinon", + "sinon_qunit": "../lib/sinon/sinon-qunit" + }, + "shim": { + "md5": {"exports": "hex_md5"}, + "localstorage": ["jio", "complex_queries"], + + "sinon": ["qunit"], + "sinon_qunit": ["sinon"] + } + }); + + require([ + "sinon_qunit", + "jio_tests", + "localstorage_tests" + ]); +}()); -- 2.30.9