Skip to content

Commit 89dda36

Browse files
authored
Merge pull request #48 from algorandfoundation/refactor/move-implementation
refactor: move all implementation logic from algo-ts to algo-ts-testing
2 parents aec730f + 443f8df commit 89dda36

File tree

88 files changed

+2967
-1544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2967
-1544
lines changed

docs/code/index/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88

99
## Classes
1010

11+
- [AssertError](classes/AssertError.md)
12+
- [AvmError](classes/AvmError.md)
13+
- [CodeError](classes/CodeError.md)
14+
- [InternalError](classes/InternalError.md)
15+
- [NotImplementedError](classes/NotImplementedError.md)
1116
- [TestExecutionContext](classes/TestExecutionContext.md)
1217

13-
## Variables
14-
15-
- [encodingUtil](variables/encodingUtil.md)
16-
1718
## Functions
1819

1920
- [addEqualityTesters](functions/addEqualityTesters.md)
21+
- [toExternalValue](functions/toExternalValue.md)
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
[**@algorandfoundation/algorand-typescript-testing**](../../README.md)
2+
3+
***
4+
5+
[@algorandfoundation/algorand-typescript-testing](../../README.md) / [index](../README.md) / AssertError
6+
7+
# Class: AssertError
8+
9+
Defined in: [src/errors.ts:22](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L22)
10+
11+
Raised when an assertion fails
12+
13+
## Extends
14+
15+
- [`AvmError`](AvmError.md)
16+
17+
## Constructors
18+
19+
### new AssertError()
20+
21+
> **new AssertError**(`message`): [`AssertError`](AssertError.md)
22+
23+
Defined in: [src/errors.ts:23](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L23)
24+
25+
#### Parameters
26+
27+
##### message
28+
29+
`string`
30+
31+
#### Returns
32+
33+
[`AssertError`](AssertError.md)
34+
35+
#### Overrides
36+
37+
[`AvmError`](AvmError.md).[`constructor`](AvmError.md#constructors)
38+
39+
## Properties
40+
41+
### cause?
42+
43+
> `optional` **cause**: `unknown`
44+
45+
Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
46+
47+
#### Inherited from
48+
49+
[`AvmError`](AvmError.md).[`cause`](AvmError.md#cause)
50+
51+
***
52+
53+
### message
54+
55+
> **message**: `string`
56+
57+
Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077
58+
59+
#### Inherited from
60+
61+
[`AvmError`](AvmError.md).[`message`](AvmError.md#message-1)
62+
63+
***
64+
65+
### name
66+
67+
> **name**: `string`
68+
69+
Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
70+
71+
#### Inherited from
72+
73+
[`AvmError`](AvmError.md).[`name`](AvmError.md#name)
74+
75+
***
76+
77+
### stack?
78+
79+
> `optional` **stack**: `string`
80+
81+
Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
82+
83+
#### Inherited from
84+
85+
[`AvmError`](AvmError.md).[`stack`](AvmError.md#stack)
86+
87+
***
88+
89+
### prepareStackTrace()?
90+
91+
> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
92+
93+
Defined in: node\_modules/@types/node/globals.d.ts:143
94+
95+
Optional override for formatting stack traces
96+
97+
#### Parameters
98+
99+
##### err
100+
101+
`Error`
102+
103+
##### stackTraces
104+
105+
`CallSite`[]
106+
107+
#### Returns
108+
109+
`any`
110+
111+
#### See
112+
113+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
114+
115+
#### Inherited from
116+
117+
[`AvmError`](AvmError.md).[`prepareStackTrace`](AvmError.md#preparestacktrace)
118+
119+
***
120+
121+
### stackTraceLimit
122+
123+
> `static` **stackTraceLimit**: `number`
124+
125+
Defined in: node\_modules/@types/node/globals.d.ts:145
126+
127+
#### Inherited from
128+
129+
[`AvmError`](AvmError.md).[`stackTraceLimit`](AvmError.md#stacktracelimit)
130+
131+
## Methods
132+
133+
### captureStackTrace()
134+
135+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`
136+
137+
Defined in: node\_modules/@types/node/globals.d.ts:136
138+
139+
Create .stack property on a target object
140+
141+
#### Parameters
142+
143+
##### targetObject
144+
145+
`object`
146+
147+
##### constructorOpt?
148+
149+
`Function`
150+
151+
#### Returns
152+
153+
`void`
154+
155+
#### Inherited from
156+
157+
[`AvmError`](AvmError.md).[`captureStackTrace`](AvmError.md#capturestacktrace)
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
[**@algorandfoundation/algorand-typescript-testing**](../../README.md)
2+
3+
***
4+
5+
[@algorandfoundation/algorand-typescript-testing](../../README.md) / [index](../README.md) / AvmError
6+
7+
# Class: AvmError
8+
9+
Defined in: [src/errors.ts:5](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L5)
10+
11+
Raised when an `err` op is encountered, or when the testing VM is asked to do something that would cause
12+
the AVM to fail.
13+
14+
## Extends
15+
16+
- `Error`
17+
18+
## Extended by
19+
20+
- [`AssertError`](AssertError.md)
21+
22+
## Constructors
23+
24+
### new AvmError()
25+
26+
> **new AvmError**(`message`): [`AvmError`](AvmError.md)
27+
28+
Defined in: [src/errors.ts:6](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/src/errors.ts#L6)
29+
30+
#### Parameters
31+
32+
##### message
33+
34+
`string`
35+
36+
#### Returns
37+
38+
[`AvmError`](AvmError.md)
39+
40+
#### Overrides
41+
42+
`Error.constructor`
43+
44+
## Properties
45+
46+
### cause?
47+
48+
> `optional` **cause**: `unknown`
49+
50+
Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
51+
52+
#### Inherited from
53+
54+
`Error.cause`
55+
56+
***
57+
58+
### message
59+
60+
> **message**: `string`
61+
62+
Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077
63+
64+
#### Inherited from
65+
66+
`Error.message`
67+
68+
***
69+
70+
### name
71+
72+
> **name**: `string`
73+
74+
Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
75+
76+
#### Inherited from
77+
78+
`Error.name`
79+
80+
***
81+
82+
### stack?
83+
84+
> `optional` **stack**: `string`
85+
86+
Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
87+
88+
#### Inherited from
89+
90+
`Error.stack`
91+
92+
***
93+
94+
### prepareStackTrace()?
95+
96+
> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
97+
98+
Defined in: node\_modules/@types/node/globals.d.ts:143
99+
100+
Optional override for formatting stack traces
101+
102+
#### Parameters
103+
104+
##### err
105+
106+
`Error`
107+
108+
##### stackTraces
109+
110+
`CallSite`[]
111+
112+
#### Returns
113+
114+
`any`
115+
116+
#### See
117+
118+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
119+
120+
#### Inherited from
121+
122+
`Error.prepareStackTrace`
123+
124+
***
125+
126+
### stackTraceLimit
127+
128+
> `static` **stackTraceLimit**: `number`
129+
130+
Defined in: node\_modules/@types/node/globals.d.ts:145
131+
132+
#### Inherited from
133+
134+
`Error.stackTraceLimit`
135+
136+
## Methods
137+
138+
### captureStackTrace()
139+
140+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void`
141+
142+
Defined in: node\_modules/@types/node/globals.d.ts:136
143+
144+
Create .stack property on a target object
145+
146+
#### Parameters
147+
148+
##### targetObject
149+
150+
`object`
151+
152+
##### constructorOpt?
153+
154+
`Function`
155+
156+
#### Returns
157+
158+
`void`
159+
160+
#### Inherited from
161+
162+
`Error.captureStackTrace`

0 commit comments

Comments
 (0)