diff --git a/src/index.js b/src/index.js index de62076..8dd214f 100644 --- a/src/index.js +++ b/src/index.js @@ -5,8 +5,12 @@ function b() { console.log('a', eval(window.data)); } +function c() { + console.log('a', eval(window.data)); +} module.exports = { a, - b + b, + c } \ No newline at end of file diff --git a/tests/index.test.js b/tests/index.test.js index 734089b..430759e 100644 --- a/tests/index.test.js +++ b/tests/index.test.js @@ -6,4 +6,19 @@ describe('a', () => { expect(a).toBeInstanceOf(Function) expect(a()).toBeUndefined() }) + it('test1', () => { + // is function + expect(a).toBeInstanceOf(Function) + expect(a()).toBeUndefined() + }) + it('test2', () => { + // is function + expect(a).toBeInstanceOf(Function) + expect(a()).toBeUndefined() + }) + it('test3', () => { + // is function + expect(a).toBeInstanceOf(Function) + expect(a()).toBeUndefined() + }) }) \ No newline at end of file