File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ import hook from './shortcuts'
2+
3+ const POSITION_ADDRESS = '0x2cde9919e81b20b4b33dd562a48a84b54c48f00c'
4+
5+ describe ( 'getShortcutDefinitions' , ( ) => {
6+ it ( 'should get the address definitions successfully' , async ( ) => {
7+ const shortcuts = await hook . getShortcutDefinitions (
8+ 'celo' ,
9+ '0x2b8441ef13333ffa955c9ea5ab5b3692da95260d' ,
10+ )
11+ expect ( shortcuts . length ) . toBeGreaterThan ( 0 )
12+ } )
13+
14+ describe ( '.onTrigger' , ( ) => {
15+ it ( 'should return a Transaction' , async ( ) => {
16+ const shortcuts = await hook . getShortcutDefinitions (
17+ 'celo' ,
18+ '0x2b8441ef13333ffa955c9ea5ab5b3692da95260d' ,
19+ )
20+ const shortcut = shortcuts [ 0 ]
21+
22+ const transactions = await shortcut . onTrigger (
23+ 'celo' ,
24+ '0x2b8441ef13333ffa955c9ea5ab5b3692da95260d' ,
25+ POSITION_ADDRESS ,
26+ )
27+
28+ expect ( transactions . length ) . toEqual ( 1 )
29+ } )
30+ } )
31+ } )
You can’t perform that action at this time.
0 commit comments