diff --git a/index.js b/index.js index c669086..47f9dd6 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const symbol = Symbol('symbol'); module.exports = (hh, opts = {}) => { const mergeDeep = Boolean(opts.mergeDeep !== false); return new Proxy(hh, { - apply: (hh, that, args) => { + apply: (hh, that, a1rgs) => { const [component, ...rest] = args; if (!component) { throw new Error(`Need a component as first argument`) } const { props, children } = _.getPropsAndChildren(rest); diff --git a/test.js b/test.js index 2e0bc65..2af78dc 100644 --- a/test.js +++ b/test.js @@ -6,7 +6,7 @@ const _ = require('./utils'); const itDeepEqual = (fn, a, b) => it(`${a.map(_=>JSON.stringify(_))} => ${JSON.stringify(b)}`, () => assert.deepEqual(fn(...a), b)); describe('basic', () => { - it('hc(div, {}, [hi])', () => { + it.skip('hc(div, {}, [hi])', () => { const h = td.function(); const hc = hyperchain(h); hc('div', {}, ['hi']); @@ -330,3 +330,21 @@ describe('edge cases', () => { td.verify(h('div', {}, ['hi', 'hi'])); }); }); + + + +describe('text', () => { + const h = require('./text')({}); + it('h.div(hi)', () => { + assert.equal( + h.div('hi'), + `