@algorandfoundation/algorand-typescript-testing 1.0.0-beta.24 → 1.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Let's write a simple contract and test it using the `algorand-typescript-testing
|
|
|
44
44
|
|
|
45
45
|
#### Configuring vitest
|
|
46
46
|
|
|
47
|
-
If you are using [vitest](https://vitest.dev/) with [@rollup/plugin-typescript](https://www.npmjs.com/package/@rollup/plugin-typescript) plugin, configure `puyaTsTransformer` as a `before` stage transformer of `typescript` plugin in `vitest.config.mts` file.
|
|
47
|
+
If you are using [vitest](https://vitest.dev/) with [@rollup/plugin-typescript](https://www.npmjs.com/package/@rollup/plugin-typescript) plugin, configure `puyaTsTransformer` as a `before` stage transformer of the `typescript` plugin in `vitest.config.mts` file.
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
50
|
import typescript from '@rollup/plugin-typescript'
|
|
@@ -79,7 +79,7 @@ beforeAll(() => {
|
|
|
79
79
|
|
|
80
80
|
#### Configuring jest
|
|
81
81
|
|
|
82
|
-
If you are using [jest](https://jestjs.io/) with [ts-jest](https://www.npmjs.com/package/ts-jest), [@jest/globals](https://www.npmjs.com/package/@jest/globals) and [ts-node](https://www.npmjs.com/package/ts-node) plugins, configure `puyaTsTransformer` as a `before` stage transformer of `typescript` plugin in `jest.config.ts` file.
|
|
82
|
+
If you are using [jest](https://jestjs.io/) with [ts-jest](https://www.npmjs.com/package/ts-jest), [@jest/globals](https://www.npmjs.com/package/@jest/globals) and [ts-node](https://www.npmjs.com/package/ts-node) plugins, configure `puyaTsTransformer` as a `before` stage transformer of the `typescript` plugin in `jest.config.ts` file.
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
85
|
import { createDefaultEsmPreset, type JestConfigWithTsJest } from 'ts-jest'
|
|
@@ -116,13 +116,16 @@ beforeAll(() => {
|
|
|
116
116
|
})
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
You'll also need to run `jest` with the `--experimental-vm-modules` and `--experimental-require-module` flags in the `package.json`. This requires node 20.17 or greater.
|
|
120
120
|
|
|
121
121
|
```json
|
|
122
122
|
{
|
|
123
123
|
"name": "puya-ts-demo",
|
|
124
124
|
"scripts": {
|
|
125
|
-
"test:jest": "tsc && node --experimental-vm-modules node_modules/jest/bin/jest"
|
|
125
|
+
"test:jest": "tsc && node --experimental-vm-modules --experimental-require-module node_modules/jest/bin/jest"
|
|
126
|
+
},
|
|
127
|
+
"engines": {
|
|
128
|
+
"node": ">=20.17"
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
```
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"**"
|
|
5
5
|
],
|
|
6
6
|
"name": "@algorandfoundation/algorand-typescript-testing",
|
|
7
|
-
"version": "1.0.0-beta.
|
|
7
|
+
"version": "1.0.0-beta.25",
|
|
8
8
|
"description": "A library which allows you to execute Algorand TypeScript code locally under a test context either emulating or mocking AVM behaviour.",
|
|
9
9
|
"private": false,
|
|
10
10
|
"peerDependencies": {
|