mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Basic testing framework.
This commit is contained in:
parent
654706f15f
commit
6ced6ded17
3 changed files with 37 additions and 1 deletions
|
@ -24,6 +24,8 @@
|
|||
},
|
||||
"homepage": "https://github.com/neilj/Squire",
|
||||
"devDependencies": {
|
||||
"uglify-js": "^2.4.15"
|
||||
"mocha": "2.2.5",
|
||||
"uglify-js": "^2.4.15",
|
||||
"unexpected": "8.2.0"
|
||||
}
|
||||
}
|
||||
|
|
23
test/index.html
Normal file
23
test/index.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Squire rich-text editor tests</title>
|
||||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
|
||||
</head>
|
||||
<body>
|
||||
<script src="../node_modules/mocha/mocha.js"></script>
|
||||
<script src="../node_modules/unexpected/unexpected.js"></script>
|
||||
<script src="../build/squire-raw.js"></script>
|
||||
<iframe id="testFrame" style="visibility: hidden;"></iframe>
|
||||
<div id="mocha"></div>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
var expect = weknowhow.expect;
|
||||
</script>
|
||||
<script src="squire.spec.js"></script>
|
||||
<script>
|
||||
mocha.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
11
test/squire.spec.js
Normal file
11
test/squire.spec.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*global expect, describe, afterEach, beforeEach, it */
|
||||
describe('Squire RTE', function () {
|
||||
var editor;
|
||||
beforeEach(function () {
|
||||
editor = new Squire(document.getElementById('testFrame').contentDocument);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
editor = null;
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue