-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathagent-like.test.ts
More file actions
36 lines (28 loc) · 891 Bytes
/
agent-like.test.ts
File metadata and controls
36 lines (28 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { should } from 'chai'; should();
import { PinMap } from '../../pin/pin-map';
import { isAgentLike } from '../agent-like';
describe('isAgentLike()', () => {
it('should be true for stuff that are `AgentLike` and false for whatever else.', () => {
isAgentLike({
in(){}, out(){},
inputs: new PinMap(), outputs: new PinMap(),
signature: {outputs: []}
}).should.be.true;
isAgentLike({
in(){}, out(){},
inputs: new PinMap(), outputs: new PinMap(),
}).should.be.false;
isAgentLike({
in(){},
inputs: new PinMap(), outputs: new PinMap(),
signature: {outputs: []}
}).should.be.false;
isAgentLike({
in(){}, out(){},
inputs: new PinMap(), outputs: 42,
signature: {outputs: []}
}).should.be.false;
isAgentLike(42).should.be.false;
isAgentLike(undefined).should.be.false;
});
});