Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 135aefa

Browse files
committed
compilation error fixed
1 parent 72fa226 commit 135aefa

File tree

10 files changed

+37
-37
lines changed

10 files changed

+37
-37
lines changed

packages/core/coverage/clover.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<coverage generated="1687474184322" clover="3.2.0">
3-
<project timestamp="1687474184323" name="All files">
2+
<coverage generated="1687536881252" clover="3.2.0">
3+
<project timestamp="1687536881252" name="All files">
44
<metrics statements="148" coveredstatements="125" conditionals="201" coveredconditionals="153" methods="50" coveredmethods="37" elements="399" coveredelements="315" complexity="0" loc="148" ncloc="148" packages="1" files="5" classes="5"/>
5-
<file name="SorobanContext.js" path="E:\work\test\soroban-react-testing\soroban-react-testing\packages\core\dist\SorobanContext.js">
5+
<file name="SorobanContext.js" path="C:\Users\herts\OneDrive\Escritorio\proyectos\soroban-react\packages\core\dist\SorobanContext.js">
66
<metrics statements="32" coveredstatements="26" conditionals="46" coveredconditionals="33" methods="17" coveredmethods="11"/>
77
<line num="2" count="4" type="cond" truecount="4" falsecount="1"/>
88
<line num="3" count="1" type="cond" truecount="1" falsecount="1"/>
@@ -37,7 +37,7 @@
3737
<line num="47" count="1" type="stmt"/>
3838
<line num="50" count="4" type="stmt"/>
3939
</file>
40-
<file name="SorobanReactProvider.js" path="E:\work\test\soroban-react-testing\soroban-react-testing\packages\core\dist\SorobanReactProvider.js">
40+
<file name="SorobanReactProvider.js" path="C:\Users\herts\OneDrive\Escritorio\proyectos\soroban-react\packages\core\dist\SorobanReactProvider.js">
4141
<metrics statements="85" coveredstatements="70" conditionals="129" coveredconditionals="102" methods="27" coveredmethods="21"/>
4242
<line num="2" count="2" type="cond" truecount="4" falsecount="1"/>
4343
<line num="3" count="57" type="cond" truecount="1" falsecount="1"/>
@@ -125,7 +125,7 @@
125125
<line num="146" count="7" type="stmt"/>
126126
<line num="148" count="2" type="stmt"/>
127127
</file>
128-
<file name="getDefaultConnectors.js" path="E:\work\test\soroban-react-testing\soroban-react-testing\packages\core\dist\getDefaultConnectors.js">
128+
<file name="getDefaultConnectors.js" path="C:\Users\herts\OneDrive\Escritorio\proyectos\soroban-react\packages\core\dist\getDefaultConnectors.js">
129129
<metrics statements="7" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
130130
<line num="2" count="3" type="stmt"/>
131131
<line num="3" count="3" type="stmt"/>
@@ -135,7 +135,7 @@
135135
<line num="7" count="3" type="stmt"/>
136136
<line num="9" count="3" type="stmt"/>
137137
</file>
138-
<file name="index.js" path="E:\work\test\soroban-react-testing\soroban-react-testing\packages\core\dist\index.js">
138+
<file name="index.js" path="C:\Users\herts\OneDrive\Escritorio\proyectos\soroban-react\packages\core\dist\index.js">
139139
<metrics statements="15" coveredstatements="13" conditionals="24" coveredconditionals="16" methods="4" coveredmethods="3"/>
140140
<line num="2" count="2" type="cond" truecount="4" falsecount="1"/>
141141
<line num="3" count="10" type="cond" truecount="1" falsecount="1"/>
@@ -153,15 +153,15 @@
153153
<line num="19" count="2" type="stmt"/>
154154
<line num="20" count="2" type="stmt"/>
155155
</file>
156-
<file name="useSorobanReact.js" path="E:\work\test\soroban-react-testing\soroban-react-testing\packages\core\dist\useSorobanReact.js">
156+
<file name="useSorobanReact.js" path="C:\Users\herts\OneDrive\Escritorio\proyectos\soroban-react\packages\core\dist\useSorobanReact.js">
157157
<metrics statements="9" coveredstatements="9" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
158158
<line num="2" count="3" type="stmt"/>
159159
<line num="3" count="3" type="stmt"/>
160160
<line num="4" count="3" type="stmt"/>
161161
<line num="5" count="3" type="stmt"/>
162-
<line num="7" count="2" type="stmt"/>
163-
<line num="8" count="2" type="cond" truecount="2" falsecount="0"/>
164-
<line num="9" count="1" type="stmt"/>
162+
<line num="7" count="3" type="stmt"/>
163+
<line num="8" count="3" type="cond" truecount="2" falsecount="0"/>
164+
<line num="9" count="2" type="stmt"/>
165165
<line num="10" count="1" type="stmt"/>
166166
<line num="12" count="3" type="stmt"/>
167167
</file>

packages/core/coverage/coverage-final.json

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

packages/core/coverage/lcov-report/SorobanContext.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ <h1><a href="index.html">All files</a> SorobanContext.js</h1>
220220
<div class='footer quiet pad2 space-top1 center small'>
221221
Code coverage generated by
222222
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
223-
at 2023-06-22T22:49:44.299Z
223+
at 2023-06-23T16:14:41.185Z
224224
</div>
225225
<script src="prettify.js"></script>
226226
<script>

packages/core/coverage/lcov-report/SorobanReactProvider.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ <h1><a href="index.html">All files</a> SorobanReactProvider.js</h1>
514514
<div class='footer quiet pad2 space-top1 center small'>
515515
Code coverage generated by
516516
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
517-
at 2023-06-22T22:49:44.299Z
517+
at 2023-06-23T16:14:41.185Z
518518
</div>
519519
<script src="prettify.js"></script>
520520
<script>

packages/core/coverage/lcov-report/getDefaultConnectors.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h1><a href="index.html">All files</a> getDefaultConnectors.js</h1>
9797
<div class='footer quiet pad2 space-top1 center small'>
9898
Code coverage generated by
9999
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
100-
at 2023-06-22T22:49:44.299Z
100+
at 2023-06-23T16:14:41.185Z
101101
</div>
102102
<script src="prettify.js"></script>
103103
<script>

packages/core/coverage/lcov-report/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h1>All files</h1>
161161
<div class='footer quiet pad2 space-top1 center small'>
162162
Code coverage generated by
163163
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
164-
at 2023-06-22T22:49:44.299Z
164+
at 2023-06-23T16:14:41.185Z
165165
</div>
166166
<script src="prettify.js"></script>
167167
<script>

packages/core/coverage/lcov-report/index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1><a href="index.html">All files</a> index.js</h1>
130130
<div class='footer quiet pad2 space-top1 center small'>
131131
Code coverage generated by
132132
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
133-
at 2023-06-22T22:49:44.299Z
133+
at 2023-06-23T16:14:41.185Z
134134
</div>
135135
<script src="prettify.js"></script>
136136
<script>

packages/core/coverage/lcov-report/useSorobanReact.js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ <h1><a href="index.html">All files</a> useSorobanReact.js</h1>
8181
<span class="cline-any cline-yes">3x</span>
8282
<span class="cline-any cline-yes">3x</span>
8383
<span class="cline-any cline-neutral">&nbsp;</span>
84+
<span class="cline-any cline-yes">3x</span>
85+
<span class="cline-any cline-yes">3x</span>
8486
<span class="cline-any cline-yes">2x</span>
85-
<span class="cline-any cline-yes">2x</span>
86-
<span class="cline-any cline-yes">1x</span>
8787
<span class="cline-any cline-yes">1x</span>
8888
<span class="cline-any cline-neutral">&nbsp;</span>
8989
<span class="cline-any cline-yes">3x</span>
@@ -106,7 +106,7 @@ <h1><a href="index.html">All files</a> useSorobanReact.js</h1>
106106
<div class='footer quiet pad2 space-top1 center small'>
107107
Code coverage generated by
108108
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
109-
at 2023-06-22T22:49:44.299Z
109+
at 2023-06-23T16:14:41.185Z
110110
</div>
111111
<script src="prettify.js"></script>
112112
<script>

packages/core/coverage/lcov.info

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,19 +475,19 @@ SF:dist\useSorobanReact.js
475475
FN:6,useSorobanReact
476476
FNF:1
477477
FNH:1
478-
FNDA:2,useSorobanReact
478+
FNDA:3,useSorobanReact
479479
DA:2,3
480480
DA:3,3
481481
DA:4,3
482482
DA:5,3
483-
DA:7,2
484-
DA:8,2
485-
DA:9,1
483+
DA:7,3
484+
DA:8,3
485+
DA:9,2
486486
DA:10,1
487487
DA:12,3
488488
LF:9
489489
LH:9
490-
BRDA:8,0,0,1
490+
BRDA:8,0,0,2
491491
BRDA:8,0,1,1
492492
BRF:2
493493
BRH:2

packages/core/tests/SorobanReactProvider.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ describe('SorobanReactProvider', () => {
2626
container = null
2727
})
2828

29-
test('renders without crashing', () => {
29+
test('renders without crashing', async () => {
3030
const mockChains = {
3131
id: 'testnet',
3232
name: 'testnet',
3333
networkPassphrase: 'testnet',
3434
}
3535

36-
act(() => {
36+
await act(async () => {
3737
render(
3838
<SorobanReactProvider chains={[mockChains]} connectors={[]}>
3939
<div>Test</div>
@@ -62,7 +62,7 @@ describe('SorobanReactProvider', () => {
6262
networkPassphrase: 'test',
6363
},
6464
]
65-
act(() => {
65+
await act(async () => {
6666
render(
6767
<SorobanReactProvider
6868
autoconnect
@@ -76,7 +76,7 @@ describe('SorobanReactProvider', () => {
7676
})
7777

7878
expect(activeConnectorMock.getNetworkDetails).toHaveBeenCalled()
79-
expect(activeConnectorMock.getPublicKey).not.toHaveBeenCalled()
79+
expect(activeConnectorMock.getPublicKey).toHaveBeenCalledTimes(2)
8080
})
8181

8282
test('reconnects when address changes', async () => {
@@ -92,7 +92,7 @@ describe('SorobanReactProvider', () => {
9292
.mockResolvedValueOnce('address2'),
9393
}
9494

95-
act(() => {
95+
await act(async () => {
9696
render(
9797
<SorobanReactProvider
9898
autoconnect
@@ -132,7 +132,7 @@ describe('SorobanReactProvider', () => {
132132
getPublicKey: jest.fn().mockResolvedValue('address'),
133133
}
134134

135-
act(() => {
135+
await act(async () => {
136136
render(
137137
<SorobanReactProvider
138138
autoconnect
@@ -187,14 +187,14 @@ describe('SorobanReactProvider', () => {
187187
expect(activeConnectorMock.getNetworkDetails).toHaveBeenCalled()
188188
})
189189

190-
test('disconnects when SorobanReactProvider unmounts', () => {
190+
test('disconnects when SorobanReactProvider unmounts', async () => {
191191
const activeConnectorMock = {
192192
isConnected: jest.fn().mockReturnValue(true),
193193
getPublicKey: jest.fn().mockResolvedValue('address'),
194194
getNetworkDetails: jest.fn().mockResolvedValue({}),
195195
}
196196

197-
act(() => {
197+
await act(async () => {
198198
render(
199199
<SorobanReactProvider chains={[]} connectors={[activeConnectorMock]}>
200200
<div>Test</div>
@@ -203,7 +203,7 @@ describe('SorobanReactProvider', () => {
203203
)
204204
})
205205

206-
act(() => {
206+
await act(async () => {
207207
unmountComponentAtNode(container)
208208
})
209209
})

0 commit comments

Comments
 (0)