11import { expect } from '@esm-bundle/chai'
2- import { ethers } from 'ethers'
2+ import { ethers } from 'bundled- ethers'
33import { Connection } from './index'
44import { define } from '@aggre/ullr'
55import { html , render } from 'lit'
@@ -46,7 +46,7 @@ describe('dev-connection', () => {
4646 )
4747 el . signer . next ( mock )
4848
49- await waitForUpdated ( el . account . asObservable ( ) )
49+ await waitForUpdated ( el . account )
5050 expect ( el . account . getValue ( ) ) . to . be . equal ( await mock . getAddress ( ) )
5151 } )
5252 it ( 'when signer is changed to undefined, account will update to undefined' , async ( ) => {
@@ -56,11 +56,11 @@ describe('dev-connection', () => {
5656 new ethers . providers . JsonRpcProvider ( rpcEndpoints [ 0 ] )
5757 )
5858 el . signer . next ( mock )
59- await waitForUpdated ( el . account . asObservable ( ) )
59+ await waitForUpdated ( el . account )
6060
6161 el . signer . next ( undefined )
6262
63- await waitForUpdated ( el . account . asObservable ( ) )
63+ await waitForUpdated ( el . account )
6464 expect ( el . account . getValue ( ) ) . to . be . equal ( undefined )
6565 } )
6666 it ( 'when signer is changed to undefined, provider will update to undefined' , async ( ) => {
@@ -128,7 +128,7 @@ describe('dev-connection', () => {
128128 await waitForUpdated ( el . chain . pipe ( filter ( ( x ) => x !== undefined ) ) )
129129 expect ( el . chain . getValue ( ) ) . to . be . equal ( 42161 )
130130 } )
131- it ( 'when provider is changed to undefined, chain and signer will update to undefined' , async ( ) => {
131+ it ( 'when provider is changed to undefined, chain will update to undefined' , async ( ) => {
132132 const el = connection ( )
133133 const mock = new ethers . providers . JsonRpcProvider ( rpcEndpoints [ 0 ] )
134134 el . provider . next ( mock )
@@ -140,7 +140,6 @@ describe('dev-connection', () => {
140140 await waitForUpdated ( el . chain . pipe ( filter ( ( x ) => x === undefined ) ) )
141141
142142 expect ( el . chain . getValue ( ) ) . to . be . equal ( undefined )
143- expect ( el . signer . getValue ( ) ) . to . be . equal ( undefined )
144143 } )
145144 } )
146145} )
0 commit comments