Skip to content

Commit f1f7b6f

Browse files
committed
修复单元测是
1 parent e1783c4 commit f1f7b6f

File tree

22 files changed

+3390
-983
lines changed

22 files changed

+3390
-983
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Node.js
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: '18.x'
18+
node-version: '20.x'
1919
registry-url: 'https://registry.npmjs.org'
2020

2121
- name: Install dependencies

coverage/clover.xml

Lines changed: 98 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,158 +1,115 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<coverage generated="1734062283223" clover="3.2.0">
3-
<project timestamp="1734062283223" name="All files">
4-
<metrics statements="135" coveredstatements="19" conditionals="70" coveredconditionals="4" methods="24" coveredmethods="2" elements="229" coveredelements="25" complexity="0" loc="135" ncloc="135" packages="2" files="4" classes="4"/>
5-
<package name="src">
6-
<metrics statements="16" coveredstatements="13" conditionals="5" coveredconditionals="4" methods="0" coveredmethods="0"/>
7-
<file name="config.js" path="/Users/nick/projects/web3/opensea-offer-maker/src/config.js">
8-
<metrics statements="16" coveredstatements="13" conditionals="5" coveredconditionals="4" methods="0" coveredmethods="0"/>
9-
<line num="5" count="1" type="stmt"/>
10-
<line num="8" count="1" type="stmt"/>
11-
<line num="9" count="1" type="stmt"/>
12-
<line num="10" count="1" type="stmt"/>
13-
<line num="13" count="1" type="cond" truecount="4" falsecount="1"/>
14-
<line num="14" count="0" type="stmt"/>
15-
<line num="15" count="0" type="stmt"/>
16-
<line num="16" count="0" type="stmt"/>
17-
<line num="20" count="1" type="stmt"/>
18-
<line num="23" count="1" type="stmt"/>
19-
<line num="24" count="1" type="stmt"/>
20-
<line num="27" count="1" type="stmt"/>
21-
<line num="30" count="1" type="stmt"/>
22-
<line num="36" count="1" type="stmt"/>
23-
<line num="41" count="1" type="stmt"/>
24-
<line num="42" count="1" type="stmt"/>
25-
</file>
26-
</package>
27-
<package name="src.services">
28-
<metrics statements="119" coveredstatements="6" conditionals="65" coveredconditionals="0" methods="24" coveredmethods="2"/>
29-
<file name="offerService.js" path="/Users/nick/projects/web3/opensea-offer-maker/src/services/offerService.js">
30-
<metrics statements="42" coveredstatements="6" conditionals="16" coveredconditionals="0" methods="9" coveredmethods="2"/>
31-
<line num="12" count="1" type="stmt"/>
32-
<line num="13" count="1" type="stmt"/>
33-
<line num="14" count="1" type="stmt"/>
34-
<line num="19" count="0" type="cond" truecount="0" falsecount="2"/>
35-
<line num="20" count="0" type="stmt"/>
36-
<line num="22" count="0" type="stmt"/>
37-
<line num="26" count="0" type="cond" truecount="0" falsecount="2"/>
2+
<coverage generated="1734426673863" clover="3.2.0">
3+
<project timestamp="1734426673863" name="All files">
4+
<metrics statements="98" coveredstatements="21" conditionals="35" coveredconditionals="10" methods="18" coveredmethods="5" elements="151" coveredelements="36" complexity="0" loc="98" ncloc="98" packages="2" files="2" classes="2"/>
5+
<package name="services">
6+
<metrics statements="84" coveredstatements="16" conditionals="21" coveredconditionals="7" methods="11" coveredmethods="3"/>
7+
<file name="openseaApi.js" path="/Users/nick/projects/web3/opensea-offer-maker/src/services/openseaApi.js">
8+
<metrics statements="84" coveredstatements="16" conditionals="21" coveredconditionals="7" methods="11" coveredmethods="3"/>
9+
<line num="5" count="2" type="stmt"/>
10+
<line num="6" count="2" type="stmt"/>
11+
<line num="7" count="2" type="stmt"/>
12+
<line num="11" count="2" type="stmt"/>
13+
<line num="12" count="6" type="stmt"/>
14+
<line num="13" count="6" type="stmt"/>
15+
<line num="22" count="1" type="cond" truecount="1" falsecount="1"/>
16+
<line num="23" count="0" type="stmt"/>
17+
<line num="26" count="1" type="cond" truecount="1" falsecount="1"/>
3818
<line num="27" count="0" type="stmt"/>
39-
<line num="29" count="0" type="stmt"/>
40-
<line num="33" count="0" type="cond" truecount="0" falsecount="4"/>
19+
<line num="28" count="0" type="stmt"/>
20+
<line num="31" count="1" type="cond" truecount="1" falsecount="1"/>
21+
<line num="32" count="0" type="stmt"/>
22+
<line num="33" count="0" type="stmt"/>
4123
<line num="34" count="0" type="stmt"/>
42-
<line num="36" count="0" type="stmt"/>
43-
<line num="41" count="0" type="stmt"/>
24+
<line num="37" count="1" type="stmt"/>
25+
<line num="39" count="5" type="stmt"/>
26+
<line num="41" count="5" type="cond" truecount="1" falsecount="1"/>
4427
<line num="42" count="0" type="stmt"/>
45-
<line num="43" count="0" type="stmt"/>
46-
<line num="44" count="0" type="stmt"/>
47-
<line num="56" count="0" type="stmt"/>
28+
<line num="45" count="5" type="cond" truecount="2" falsecount="0"/>
29+
<line num="46" count="1" type="cond" truecount="1" falsecount="1"/>
30+
<line num="47" count="0" type="stmt"/>
31+
<line num="49" count="1" type="stmt"/>
32+
<line num="51" count="4" type="stmt"/>
33+
<line num="57" count="0" type="stmt"/>
4834
<line num="58" count="0" type="stmt"/>
49-
<line num="59" count="0" type="stmt"/>
5035
<line num="60" count="0" type="stmt"/>
5136
<line num="62" count="0" type="stmt"/>
52-
<line num="72" count="0" type="cond" truecount="0" falsecount="4"/>
53-
<line num="77" count="0" type="stmt"/>
54-
<line num="78" count="0" type="stmt"/>
55-
<line num="89" count="0" type="stmt"/>
56-
<line num="91" count="0" type="stmt"/>
57-
<line num="92" count="0" type="stmt"/>
58-
<line num="93" count="0" type="stmt"/>
59-
<line num="95" count="0" type="stmt"/>
60-
<line num="106" count="0" type="stmt"/>
61-
<line num="107" count="0" type="stmt"/>
62-
<line num="111" count="0" type="stmt"/>
63-
<line num="112" count="0" type="stmt"/>
64-
<line num="113" count="0" type="stmt"/>
65-
<line num="114" count="0" type="stmt"/>
66-
<line num="116" count="0" type="stmt"/>
67-
<line num="117" count="0" type="stmt"/>
68-
<line num="119" count="0" type="stmt"/>
69-
<line num="120" count="0" type="stmt"/>
70-
<line num="126" count="1" type="stmt"/>
71-
<line num="127" count="1" type="stmt"/>
72-
<line num="131" count="1" type="stmt"/>
73-
</file>
74-
<file name="offerStrategy.js" path="/Users/nick/projects/web3/opensea-offer-maker/src/services/offerStrategy.js">
75-
<metrics statements="52" coveredstatements="0" conditionals="40" coveredconditionals="0" methods="8" coveredmethods="0"/>
76-
<line num="5" count="0" type="stmt"/>
77-
<line num="6" count="0" type="stmt"/>
78-
<line num="7" count="0" type="cond" truecount="0" falsecount="2"/>
79-
<line num="8" count="0" type="cond" truecount="0" falsecount="2"/>
80-
<line num="9" count="0" type="cond" truecount="0" falsecount="2"/>
81-
<line num="10" count="0" type="cond" truecount="0" falsecount="2"/>
82-
<line num="11" count="0" type="stmt"/>
83-
<line num="12" count="0" type="stmt"/>
84-
<line num="13" count="0" type="stmt"/>
85-
<line num="14" count="0" type="cond" truecount="0" falsecount="2"/>
86-
<line num="15" count="0" type="cond" truecount="0" falsecount="2"/>
87-
<line num="19" count="0" type="stmt"/>
88-
<line num="20" count="0" type="stmt"/>
89-
<line num="21" count="0" type="stmt"/>
90-
<line num="23" count="0" type="cond" truecount="0" falsecount="2"/>
91-
<line num="27" count="0" type="cond" truecount="0" falsecount="2"/>
92-
<line num="29" count="0" type="stmt"/>
93-
<line num="30" count="0" type="stmt"/>
94-
<line num="32" count="0" type="cond" truecount="0" falsecount="2"/>
95-
<line num="36" count="0" type="stmt"/>
96-
<line num="38" count="0" type="stmt"/>
97-
<line num="41" count="0" type="cond" truecount="0" falsecount="4"/>
98-
<line num="42" count="0" type="stmt"/>
99-
<line num="44" count="0" type="cond" truecount="0" falsecount="2"/>
100-
<line num="45" count="0" type="stmt"/>
101-
<line num="46" count="0" type="stmt"/>
102-
<line num="50" count="0" type="cond" truecount="0" falsecount="2"/>
103-
<line num="51" count="0" type="stmt"/>
104-
<line num="56" count="0" type="stmt"/>
105-
<line num="63" count="0" type="stmt"/>
106-
<line num="65" count="0" type="stmt"/>
107-
<line num="66" count="0" type="stmt"/>
108-
<line num="71" count="0" type="stmt"/>
109-
<line num="73" count="0" type="cond" truecount="0" falsecount="2"/>
37+
<line num="72" count="0" type="stmt"/>
11038
<line num="74" count="0" type="stmt"/>
111-
<line num="76" count="0" type="stmt"/>
112-
<line num="79" count="0" type="cond" truecount="0" falsecount="5"/>
39+
<line num="75" count="0" type="stmt"/>
11340
<line num="80" count="0" type="stmt"/>
41+
<line num="81" count="0" type="stmt"/>
42+
<line num="82" count="0" type="stmt"/>
11443
<line num="83" count="0" type="stmt"/>
115-
<line num="84" count="0" type="stmt"/>
116-
<line num="93" count="0" type="stmt"/>
117-
<line num="94" count="0" type="stmt"/>
118-
<line num="99" count="0" type="cond" truecount="0" falsecount="2"/>
44+
<line num="85" count="0" type="stmt"/>
45+
<line num="95" count="0" type="stmt"/>
46+
<line num="96" count="0" type="stmt"/>
47+
<line num="97" count="0" type="stmt"/>
48+
<line num="99" count="0" type="stmt"/>
11949
<line num="101" count="0" type="stmt"/>
120-
<line num="102" count="0" type="stmt"/>
121-
<line num="104" count="0" type="stmt"/>
122-
<line num="105" count="0" type="cond" truecount="0" falsecount="2"/>
123-
<line num="106" count="0" type="stmt"/>
50+
<line num="109" count="0" type="stmt"/>
51+
<line num="110" count="0" type="stmt"/>
12452
<line num="112" count="0" type="stmt"/>
125-
<line num="113" count="0" type="cond" truecount="0" falsecount="2"/>
126-
<line num="114" count="0" type="stmt"/>
127-
<line num="115" count="0" type="stmt"/>
53+
<line num="113" count="0" type="stmt"/>
54+
<line num="118" count="0" type="stmt"/>
55+
<line num="119" count="0" type="stmt"/>
56+
<line num="121" count="0" type="stmt"/>
57+
<line num="123" count="0" type="stmt"/>
58+
<line num="131" count="0" type="stmt"/>
59+
<line num="133" count="0" type="stmt"/>
60+
<line num="134" count="0" type="stmt"/>
61+
<line num="139" count="0" type="stmt"/>
62+
<line num="140" count="0" type="stmt"/>
63+
<line num="144" count="0" type="stmt"/>
64+
<line num="153" count="0" type="stmt"/>
65+
<line num="155" count="0" type="stmt"/>
66+
<line num="156" count="0" type="stmt"/>
67+
<line num="161" count="0" type="stmt"/>
68+
<line num="162" count="0" type="stmt"/>
69+
<line num="164" count="0" type="stmt"/>
70+
<line num="166" count="0" type="stmt"/>
71+
<line num="176" count="0" type="cond" truecount="0" falsecount="2"/>
72+
<line num="177" count="0" type="stmt"/>
73+
<line num="178" count="0" type="stmt"/>
74+
<line num="181" count="0" type="stmt"/>
75+
<line num="186" count="0" type="stmt"/>
76+
<line num="187" count="0" type="stmt"/>
77+
<line num="192" count="0" type="stmt"/>
78+
<line num="193" count="0" type="stmt"/>
79+
<line num="194" count="0" type="cond" truecount="0" falsecount="2"/>
80+
<line num="195" count="0" type="stmt"/>
81+
<line num="198" count="0" type="stmt"/>
82+
<line num="200" count="0" type="stmt"/>
83+
<line num="208" count="0" type="stmt"/>
84+
<line num="210" count="0" type="stmt"/>
85+
<line num="211" count="0" type="stmt"/>
86+
<line num="216" count="0" type="stmt"/>
87+
<line num="217" count="0" type="stmt"/>
88+
<line num="219" count="0" type="stmt"/>
89+
<line num="221" count="0" type="stmt"/>
90+
<line num="229" count="0" type="stmt"/>
91+
<line num="235" count="0" type="stmt"/>
92+
<line num="236" count="0" type="stmt"/>
12893
</file>
129-
<file name="openseaApi.js" path="/Users/nick/projects/web3/opensea-offer-maker/src/services/openseaApi.js">
130-
<metrics statements="25" coveredstatements="0" conditionals="9" coveredconditionals="0" methods="7" coveredmethods="0"/>
131-
<line num="3" count="0" type="stmt"/>
132-
<line num="4" count="0" type="stmt"/>
133-
<line num="8" count="0" type="stmt"/>
134-
<line num="9" count="0" type="stmt"/>
135-
<line num="10" count="0" type="stmt"/>
136-
<line num="19" count="0" type="cond" truecount="0" falsecount="2"/>
137-
<line num="20" count="0" type="stmt"/>
138-
<line num="21" count="0" type="stmt"/>
139-
<line num="22" count="0" type="stmt"/>
140-
<line num="25" count="0" type="stmt"/>
141-
<line num="27" count="0" type="stmt"/>
142-
<line num="28" count="0" type="cond" truecount="0" falsecount="2"/>
143-
<line num="29" count="0" type="stmt"/>
144-
<line num="35" count="0" type="stmt"/>
145-
<line num="36" count="0" type="stmt"/>
146-
<line num="45" count="0" type="stmt"/>
147-
<line num="46" count="0" type="stmt"/>
94+
</package>
95+
<package name="utils">
96+
<metrics statements="14" coveredstatements="5" conditionals="14" coveredconditionals="3" methods="7" coveredmethods="2"/>
97+
<file name="logger.js" path="/Users/nick/projects/web3/opensea-offer-maker/src/utils/logger.js">
98+
<metrics statements="14" coveredstatements="5" conditionals="14" coveredconditionals="3" methods="7" coveredmethods="2"/>
99+
<line num="1" count="1" type="stmt"/>
100+
<line num="11" count="1" type="cond" truecount="1" falsecount="1"/>
101+
<line num="17" count="0" type="stmt"/>
102+
<line num="21" count="5" type="cond" truecount="1" falsecount="1"/>
103+
<line num="22" count="5" type="stmt"/>
104+
<line num="27" count="0" type="cond" truecount="0" falsecount="2"/>
105+
<line num="28" count="0" type="stmt"/>
106+
<line num="33" count="0" type="cond" truecount="0" falsecount="2"/>
107+
<line num="34" count="0" type="stmt"/>
108+
<line num="39" count="0" type="cond" truecount="0" falsecount="2"/>
109+
<line num="40" count="0" type="stmt"/>
110+
<line num="46" count="0" type="cond" truecount="0" falsecount="2"/>
148111
<line num="47" count="0" type="stmt"/>
149-
<line num="48" count="0" type="stmt"/>
150-
<line num="50" count="0" type="stmt"/>
151-
<line num="59" count="0" type="stmt"/>
152-
<line num="60" count="0" type="stmt"/>
153-
<line num="62" count="0" type="stmt"/>
154-
<line num="71" count="0" type="stmt"/>
155-
<line num="73" count="0" type="stmt"/>
112+
<line num="52" count="1" type="stmt"/>
156113
</file>
157114
</package>
158115
</project>

0 commit comments

Comments
 (0)