mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-29 07:41:35 +00:00
handle errors on local particle call (#25)
This commit is contained in:
@ -44,6 +44,30 @@ describe('== AIR suite', () => {
|
||||
expect(res).toEqual(arg);
|
||||
});
|
||||
|
||||
it('call broken script', async function () {
|
||||
const client = await createLocalClient();
|
||||
|
||||
const script = `(htyth)`;
|
||||
|
||||
await expect(client.sendScript(script)).rejects.toContain("aqua script can't be parsed");
|
||||
});
|
||||
|
||||
it('call script without ttl', async function () {
|
||||
const client = await createLocalClient();
|
||||
|
||||
const script = `(call %init_peer_id% ("" "") [""])`;
|
||||
|
||||
await expect(client.sendScript(script, undefined, 1)).rejects.toContain("Particle expired");
|
||||
});
|
||||
|
||||
it.skip('call broken script by fetch', async function () {
|
||||
const client = await createLocalClient();
|
||||
|
||||
const script = `(htyth)`;
|
||||
|
||||
await expect(client.fetch(script, ['result'])).rejects.toContain("aqua script can't be parsed");
|
||||
});
|
||||
|
||||
it('check particle arguments', async function () {
|
||||
// arrange
|
||||
const serviceId = 'test_service';
|
||||
|
Reference in New Issue
Block a user