1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 03:19:56 +00:00
TiddlyWiki5/editions/testcommonjs/tiddlers/method/program.js

20 lines
388 B
JavaScript
Raw Normal View History

/*\
title: method/program.js
type: application/javascript
module-type: library
Method test
\*/
var test = require('test');
var a = require('./a');
var foo = a.foo;
test.assert(a.foo() == a, 'calling a module member');
test.assert(foo() == (function (){return this})(), 'members not implicitly bound');
a.set(10);
test.assert(a.get() == 10, 'get and set')
test.print('DONE', 'info');