OLD | NEW |
| (Empty) |
1 <html> | |
2 <import src="../resources/chai.sky" /> | |
3 <import src="../resources/mocha.sky" /> | |
4 <script> | |
5 describe('Module', function() { | |
6 it('should be constructable', function() { | |
7 var doc1 = new Document(); | |
8 var app = new Application(doc1, "http://www.example.com/app"); | |
9 | |
10 var doc2 = new Document(); | |
11 var module = new Module(app, doc2, "http://www.example.com/module"); | |
12 assert.equal(module.application, app); | |
13 assert.equal(module.document, doc2); | |
14 assert.equal(module.url, "http://www.example.com/module"); | |
15 }); | |
16 | |
17 it('should have an empty object by default for exports', function() { | |
18 var app = new Application(new Document(), "http://www.example.com/app"); | |
19 var module = new Module(app, new Document(), "http://www.example.com/module"
); | |
20 assert.isObject(module.exports); | |
21 assert.lengthOf(Object.keys(module.exports), 0); | |
22 }); | |
23 }); | |
24 </script> | |
25 </html> | |
OLD | NEW |