We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f756a1 commit 4bb43e2Copy full SHA for 4bb43e2
tests/lib/builders/function-builder.spec.ts
@@ -17,9 +17,16 @@
17
import { functionBuilder } from '../../../src/lib/builders/function-builder';
18
19
describe('function ', () => {
20
- it('should build an object without default type', () => {
+ it('should build an object without default type if not set', () => {
21
const fn = functionBuilder().name('function').operation('operation').build();
22
23
expect(fn.type).toBeUndefined();
24
});
25
+
26
+ it('should build an object with type= set value ', () => {
27
+ expect(functionBuilder().name('function').operation('operation').type('expression').build().type).toBe(
28
+ 'expression'
29
+ );
30
+ expect(functionBuilder().name('function').operation('operation').type('rest').build().type).toBe('rest');
31
+ });
32
0 commit comments