mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-28 23:31:33 +00:00
Xor (#24)
* Wrapping scripts with xor * Add function subscribeForErrors to handle errors
This commit is contained in:
@ -45,27 +45,39 @@ describe('== AIR suite', () => {
|
||||
});
|
||||
|
||||
it('call broken script', async function () {
|
||||
// arrange
|
||||
const client = await createLocalClient();
|
||||
const script = `(incorrect)`;
|
||||
|
||||
const script = `(htyth)`;
|
||||
// act
|
||||
const promise = client.sendScript(script);
|
||||
|
||||
await expect(client.sendScript(script)).rejects.toContain("aqua script can't be parsed");
|
||||
// assert
|
||||
await expect(promise).rejects.toContain("aqua script can't be parsed");
|
||||
});
|
||||
|
||||
it('call script without ttl', async function () {
|
||||
// arrange
|
||||
const client = await createLocalClient();
|
||||
|
||||
const script = `(call %init_peer_id% ("" "") [""])`;
|
||||
|
||||
await expect(client.sendScript(script, undefined, 1)).rejects.toContain('Particle expired');
|
||||
// act
|
||||
const promise = client.sendScript(script, undefined, 1);
|
||||
|
||||
// assert
|
||||
await expect(promise).rejects.toContain('Particle expired');
|
||||
});
|
||||
|
||||
it.skip('call broken script by fetch', async function () {
|
||||
// arrange
|
||||
const client = await createLocalClient();
|
||||
const script = `(incorrect)`;
|
||||
|
||||
const script = `(htyth)`;
|
||||
// act
|
||||
const promise = client.fetch(script, ['result']);
|
||||
|
||||
await expect(client.fetch(script, ['result'])).rejects.toContain("aqua script can't be parsed");
|
||||
// assert
|
||||
await expect(promise).rejects.toContain("aqua script can't be parsed");
|
||||
});
|
||||
|
||||
it('check particle arguments', async function () {
|
||||
|
Reference in New Issue
Block a user