xhh 14630c7632 Make JavaScript client work in both Node.js and browser
* Replace jQuery with SuperAgent which works in both Node.js and browser
* Use UMD pattern (returnExports.js) to make the module exporting compatible
  with all major systems: AMD, Node.js (CommonJS) and browser
* Implement support of header and form parameters. Closes #1736
* Move HTTP requesting code to `ApiClient` and allow customizing options
  in it, e.g. "basePath"
* Update unit tests accordingly and add some tests for `ApiClient`
2016-01-19 22:21:36 +08:00

41 lines
1.1 KiB
HTML

<html>
<head>
<meta charset="utf-8">
<title>Mocha Tests</title>
<link href="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet" />
</head>
<body>
<div id="mocha"></div>
<script src="https://cdn.rawgit.com/jquery/jquery/2.1.4/dist/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/Automattic/expect.js/0.3.1/index.js"></script>
<script src="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>
<script>
mocha.setup({
ui: 'bdd',
timeout: 10000
});
</script>
<script src="https://cdn.rawgit.com/stephanebachelier/superagent-dist/1.6.1/superagent.js"></script>
<script src="../src/model/Category.js"></script>
<script src="../src/model/Tag.js"></script>
<script src="../src/model/Pet.js"></script>
<script src="../src/model/User.js"></script>
<script src="../src/ApiClient.js"></script>
<script src="../src/api/PetApi.js"></script>
<script src="ApiClientTest.js"></script>
<script src="api/PetApiTest.js"></script>
<script>
mocha.checkLeaks();
mocha.globals(['jQuery']);
mocha.run();
</script>
</body>
</html>