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.
18 lines
532 B
18 lines
532 B
import { describe, expect, it } from '@jest/globals';
|
|
import { toNative as $$, _, fromNative as __, cnst, id, undef } from '../src/core';
|
|
|
|
describe('id', () => {
|
|
it('returns first argument', () => {
|
|
expect($$(id._(__('first')))).toBe('first');
|
|
});
|
|
});
|
|
|
|
describe('cnst', () => {
|
|
it('returns first argument after receiving second', () => {
|
|
expect($$(cnst._(__('first'))._(__('second')))).toBe('first');
|
|
});
|
|
|
|
it('ignores second argument', () => {
|
|
expect($$(cnst._(__('first'))._(undef))).toBe('first');
|
|
});
|
|
});
|
|
|