UNPKG

cream-and-sugar

Version:

A deliciously functional syntax for JavaScript with native support for JSX

17 lines (12 loc) 456 B
import assert from 'assert'; import { compileCode } from '../src/compiler/compiler'; describe('Binder', () => { it('should compile a bound value', () => { const toCompile = ':: foo'; assert.equal(compileCode(toCompile).trim(), "CNS_.lazify(foo, this);"); }); it('should compile a bound function call', () => { const toCompile = ':: foo bar'; assert.equal(compileCode(toCompile).trim(), "CNS_.lazify(foo(bar), this);"); }); });