cream-and-sugar
Version:
A deliciously functional syntax for JavaScript with native support for JSX
17 lines (12 loc) • 481 B
JavaScript
import assert from 'assert';
import { compileCode } from '../src/compiler/compiler';
describe('Protects', () => {
it('should allow reserved words to pass through the compiler', () => {
const toCompile = '~when.foo.bar';
assert.equal(compileCode(toCompile).trim(), "when.foo.bar;");
});
it('should allow bifs to pass through the compiler', () => {
const toCompile = '~lang.foo.bar';
assert.equal(compileCode(toCompile).trim(), "lang.foo.bar;");
});
});