Skip to content

Commit

Permalink
Add a test that calling af function without a required arg fails.
Browse files Browse the repository at this point in the history
Part of #20.
  • Loading branch information
jkomoros committed Jul 29, 2023
1 parent f3dc5dc commit ed8f4f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/base/a_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,13 @@
"arguments": {
"arg:message": "Test"
}
},
"call-without-arg-test": {
"type": "call",
"function": {
"seed": "function-test"
},
"arguments": {}
}
}
}
8 changes: 8 additions & 0 deletions test/base/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,14 @@ Suffix`;
assert.deepStrictEqual(actual, golden);
});

it('function/call without args test', async () => {
const garden = loadTestGarden();
const seed = await garden.seed('call-without-arg-test');
assert.rejects(async () => {
await seed.grow();
});
});

});

describe('expandSeedPacket tests', () => {
Expand Down

0 comments on commit ed8f4f7

Please sign in to comment.