UNPKG

488 BJavaScriptView Raw
1/**
2 * Test case for component.
3 * Runs with nodeunit.
4 */
5
6var ApComponent = require('../lib/ap_component.js'),
7 React = require('react');
8
9exports.setUp = function (done) {
10 done();
11};
12
13exports.tearDown = function (done) {
14 done();
15};
16
17exports['Apply autobind.'] = function (test) {
18 var component = new ApComponent({});
19 component.foo = function () {
20 };
21 component.bindAllMethods();
22
23 var foo = component.foo;
24 foo();
25 test.ok(foo);
26 test.done();
27};
28