-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfabric-contract-api.build.log
220 lines (188 loc) · 12.8 KB
/
fabric-contract-api.build.log
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Invoking: npm run lint && npm run test:unit && npm run test:schema
> [email protected] lint
> eslint ./lib ./types ./test/typescript/*.ts --ext .js --ext .ts
=============
WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.2.1 <3.7.0
YOUR TYPESCRIPT VERSION: 4.4.4
Please only submit bug reports when using the officially supported version.
=============
/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/apis/fabric-contract-api/types/index.d.ts
27:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
28:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
39:26 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
39:38 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
40:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
40:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
43:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
44:97 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
45:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
46:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
47:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
48:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
49:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/apis/fabric-contract-api/test/typescript/smartcontract.ts
35:52 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
41:71 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
✖ 15 problems (0 errors, 15 warnings)
> [email protected] test:unit
> npm run test
> [email protected] test
> nyc mocha --recursive 'test/unit/**/*.js'
Default.js
Default
2024-05-31T09:17:34.972Z info [c-api:./lib/annotations/default.js] @Default args: "Target ->","mockTarget"
✔ should add set value for default when none set
2024-05-31T09:17:34.976Z info [c-api:./lib/annotations/default.js] @Default args: "Target ->","mockTarget"
✔ should error when default already set
Info.js
Info
2024-05-31T09:17:34.978Z info [c-api:./lib/annotations/info.js] @Info args: "Info -> [object Object],","Target ->","steve"
✔ should add object as key when no objects exist for global yet
2024-05-31T09:17:34.980Z info [c-api:./lib/annotations/info.js] @Info args: "Info -> [object Object],","Target ->","steve"
✔ should add object as key when objects exist for global
Info with data
2024-05-31T09:17:34.982Z info [c-api:./lib/annotations/info.js] @Info args: "Info -> [object Object],","Target ->","steve"
✔ should add object as key when no objects exist for global yet
2024-05-31T09:17:34.983Z info [c-api:./lib/annotations/info.js] @Info args: "Info -> [object Object],","Target ->","steve"
✔ should add object as key when objects exist for global
Object.js
#Object
2024-05-31T09:17:34.985Z info [c-api:./lib/annotations/object.js] @Object args: Target -> %s "Function"
✔ should add object as key when no objects exist for global yet
2024-05-31T09:17:34.987Z info [c-api:./lib/annotations/object.js] @Object args: Target -> %s "Function"
✔ should add object as key when objects exist for global
2024-05-31T09:17:34.989Z info [c-api:./lib/annotations/object.js] @Object args: Target -> %s "Function"
✔ should add object with no supertype
2024-05-31T09:17:34.990Z info [c-api:./lib/annotations/object.js] @Object args: Target -> %s "Function"
✔ should add object with no supertype, and no expected subtypes
#Property
✔ should use the type and name passed
✔ should handle the reflected type being a function when type not passed
✔ should handle the reflected type being a function when type not passed
Transaction.js
Transaction
2024-05-31T09:17:34.996Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> mockKey, Commit -> true,","Target ->","Object"
✔ should handle existing transactions
2024-05-31T09:17:34.999Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> mockKey, Commit -> true,","Target ->","Object"
✔ should error if missing type
2024-05-31T09:17:35.001Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> mockKey, Commit -> true,","Target ->","Object"
✔ should handle existing transactions of which matches name and already has param metadata
2024-05-31T09:17:35.002Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> mockKey, Commit -> true,","Target ->","Object"
✔ should create new metadata for fabric:transactions if none exist and handle no params
2024-05-31T09:17:35.004Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> mockKey, Commit -> false,","Target ->","Object"
✔ should not add a tag if commit is false
Returns
2024-05-31T09:17:35.005Z info [c-api:./lib/annotations/transaction.js] @Returns args: ", Property Key -> mockKey, Return Type -> someType,","Target ->","Object"
✔ should handle existing transactions
2024-05-31T09:17:35.007Z info [c-api:./lib/annotations/transaction.js] @Returns args: ", Property Key -> mockKey, Return Type -> someType,","Target ->","Object"
✔ should handle when there are no existing transactions
Param
2024-05-31T09:17:35.009Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> mockKey, Param Name -> some param, Param Type -> some type, Description -> some description,","Target ->","Object"
✔ should overwrite when the transaction exists and param of name already in
2024-05-31T09:17:35.011Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> mockKey, Param Name -> some param, Param Type -> some type, Description -> some description,","Target ->","Object"
✔ should overwrite existing transaction but add new param when one with name does not exist
2024-05-31T09:17:35.012Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> mockKey, Param Name -> some param, Param Type -> some type, Description -> some description,","Target ->","Object"
✔ should append to transaction a new parameters array when transaction exists but has not parameters field
2024-05-31T09:17:35.014Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> mockKey, Param Name -> some param, Param Type -> some type, Description -> some description,","Target ->","Object"
✔ should handle when no transaction exists
2024-05-31T09:17:35.016Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> mockKey, Param Name -> some param, Param Type -> some type, Description -> undefined,","Target ->","Object"
✔ should handle when no description passed
utils
appendOrUpdate
✔ should push a new object into array made up of data passed if none existing with id
✔ should update existing object with data if id exists
findByValue
✔ should return the element in the array with the passed value in the passed field
✔ should return null if no element has the passed value for the passed field
generateSchema
✔ should return a primitive type
✔ should return a primitive type as lowercase
✔ should return a ref path for a non array and non primitive type
✔ should return a ref path for a non array and non primitive type and not use full path
✔ should recurse for array types
✔ should recurse for map types
contract.js
#constructor
✔ should create plain object ok
✔ should have set* methods
contract.js
#constructor
✔ should create with default name
2024-05-31T09:17:35.023Z error [c-api:./lib/contract.js] [some id] Contract contract-api.Contract unknown transaction "wibble",
✔ should have default unknownTx fn
✔ should create with the name specified
✔ should call the default before/after/around functions
✔ should call the default createContext functions
✔ should set the __isContract value
_isContract
✔ should return true when class is a contract
✔ should return true when class is not a contract
✔ should return true when class is not instanceOf contract but does have __isContract true
subclass specific functioning
✔ should set the correct name
✔ should call the correct subclassed fns
jsontransactionserializer.js
#constructor
✔ should create plain object ok
#toBuffer
✔ should return undefined if nothing passed in (no schema)
✔ should return string from a string in result if schema given
✔ should return number from a number in result if schema given
2024-05-31T09:17:35.031Z error [c-api:./lib/jsontransactionserializer.js] undefined toBuffer validation against schema failed on type "number","string"
✔ should throw an error if the type of data passed does not match schema given
✔ should handle booleans
✔ should return string from a string in result if JS can tell
✔ should return number from a number in result if JS can tell
✔ should handle generic object
✔ should handle array of strings
✔ should handle array of objects
#fromBuffer:obects
✔ Fully speced object
✔ Generic object - no type specificed
#fromBuffer:primitives
2024-05-31T09:17:35.036Z error [c-api:./lib/jsontransactionserializer.js] undefined fromBuffer no data supplied
✔ should throw an error if nothing given
✔ should throw an error if not a number
✔ should throw an error if bad boolean given
2024-05-31T09:17:35.037Z error [c-api:./lib/jsontransactionserializer.js] fromBuffer could not parse data as JSON to allow it to be converted to type: "some type" "trie",{}
2024-05-31T09:17:35.037Z error [c-api:./lib/jsontransactionserializer.js] Converting data to string and JSON.stringify-ing
✔ should do cope with bad input and simply tostring if bad JSON used for non string or number type
✔ should handle specific String case
✔ should handle specific Number case
✔ should handle specific Boolean case
✔ should handle specific Number case
✔ should handle booleans
✔ should handle stuff that is really vague
✔ should handle buffer that is really vague
✔ should handle errors of unkown type
✔ should handle array of strings
✔ should handle array of objects
Logger
✔ coverage
2024-05-31T09:17:35.044Z error [c-api:_] Unhandled Rejection reason __PERMITTED__ promise Promise { <rejected> '__PERMITTED__' }
2024-05-31T09:17:35.044Z error [c-api:_] Unhandled Rejection reason __PERMITTED__ promise Promise { <rejected> '__PERMITTED__' }
getLogger
✔ should create a new logger name unknown
✔ should return existing logger if known name used
✔ should set the log level to fatal when env var set to CRITICAL
✔ should set the log level to error when env var set to ERROR
✔ should set the log level to warn when env var set to WARNING
✔ should set the log level to debug when env var set to DEBUG
setLevel
✔ should update the loggers to be the level passed in
formatter
✔ anonymous logger
✔ named logger
85 passing (81ms)
=============================== Coverage summary ===============================
Statements : 100% ( 336/336 )
Branches : 100% ( 157/157 )
Functions : 100% ( 56/56 )
Lines : 100% ( 333/333 )
================================================================================
> [email protected] test:schema
> ajv compile -s ./schema/contract-schema.json && ajv validate -s ./schema/contract-schema.json -d ./schema/example-full.json
schema ./schema/contract-schema.json is valid
./schema/example-full.json valid