Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3219)

Unified Diff: sky/tests/modules/modules.sky

Issue 872043003: module.exports should default to an empty object. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/tests/modules/import-without-export.sky ('k') | sky/tests/modules/modules-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/modules/modules.sky
diff --git a/sky/tests/modules/modules.sky b/sky/tests/modules/modules.sky
index 1e7bf94a46a58d0d05331de840d18091b1e8b2a0..baccb20e383ae917f0ab8364af387b43870765f9 100644
--- a/sky/tests/modules/modules.sky
+++ b/sky/tests/modules/modules.sky
@@ -13,6 +13,13 @@ describe('Module', function() {
assert.equal(module.document, doc2);
assert.equal(module.url, "http://www.example.com/module");
});
+
+ it('should have an empty object by default for exports', function() {
+ var app = new Application(new Document(), "http://www.example.com/app");
+ var module = new Module(app, new Document(), "http://www.example.com/module");
+ assert.isObject(module.exports);
+ assert.lengthOf(Object.keys(module.exports), 0);
+ });
});
</script>
</html>
« no previous file with comments | « sky/tests/modules/import-without-export.sky ('k') | sky/tests/modules/modules-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698