Lambda calculus-like library written in TypeScript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
jlc/test/core.spec.ts

16 lines
548 B

import { describe, expect, it } from '@jest/globals';
import { _, id, cnst, Q } from '../src/core';
describe('id', () => {
it('returns first argument', () => {
expect(id).toDeferEvaluationOf(null);
expect(id(_(null as unknown as Q))).toEvaluateTo(null);
});
});
describe('cnst', () => {
it('returns first argument after receiving second', () => {
// expect(cnst).toDeferEvaluationOf(null, expect.skipped(null));
expect(cnst(_(null as unknown as Q)).then(e => e(_('whatever' as unknown as Q)))).toEvaluateTo(null);
});
});