1 | var desribeFunction = require('..');
|
2 |
|
3 | desribeFunction(__dirname + '/foo.js', 'getFoo()', function (getFn) {
|
4 | it('has function argument', function () {
|
5 | la(typeof getFn === 'function');
|
6 | });
|
7 |
|
8 | it('returns actual function', function () {
|
9 | var fn = getFn();
|
10 | la(typeof fn === 'function');
|
11 | });
|
12 |
|
13 | it('works', function () {
|
14 | var getFoo = getFn();
|
15 | la(getFoo() === 'foo');
|
16 | });
|
17 | });
|
18 |
|
19 | desribeFunction(__dirname + '/foo.js', 'getFoo()', function (getFn) {
|
20 | it('returns "foo"', function () {
|
21 | var getFoo = getFn();
|
22 | la(getFoo() === 'foo');
|
23 | });
|
24 | });
|
25 |
|
26 | desribeFunction(__dirname + '/foo.js', 'getFoo()', function (getFn) {
|
27 | var getFoo;
|
28 |
|
29 | beforeEach(function () {
|
30 | getFoo = getFn();
|
31 | });
|
32 |
|
33 | it('returns "foo"', function () {
|
34 | la(getFoo() === 'foo');
|
35 | });
|
36 |
|
37 | afterEach(function () {
|
38 | la(getFn() === getFoo);
|
39 | });
|
40 | });
|