test: upgrade core-contract-tests dependencies

This commit is contained in:
Hugo Caillard
2024-03-13 11:36:00 +01:00
committed by Nikos Baxevanis
parent fec1cb57bc
commit 4ea7e1a104
4 changed files with 1453 additions and 1034 deletions

View File

@@ -0,0 +1,87 @@
---
id: 0
name: "Simulated deployment, used as a default for `clarinet console`, `clarinet test` and `clarinet check`"
network: simnet
genesis:
wallets:
- name: deployer
address: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
balance: "100000000000000"
- name: wallet_1
address: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5
balance: "100000000000000"
- name: wallet_2
address: ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG
balance: "100000000000000"
- name: wallet_3
address: ST2JHG361ZXG51QTKY2NQCVBPPRRE2KZB1HR05NNC
balance: "100000000000000"
- name: wallet_4
address: ST2NEB84ASENDXKYGJPQW86YXQCEFEX2ZQPG87ND
balance: "100000000000000"
- name: wallet_5
address: ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB
balance: "100000000000000"
- name: wallet_6
address: ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0
balance: "100000000000000"
- name: wallet_7
address: ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ
balance: "100000000000000"
- name: wallet_8
address: ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP
balance: "100000000000000"
- name: wallet_9
address: STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6
balance: "100000000000000"
contracts:
- costs
- pox
- pox-2
- pox-3
- pox-4
- lockup
- costs-2
- costs-3
- cost-voting
- bns
plan:
batches:
- id: 0
transactions:
- emulated-contract-publish:
contract-name: bns
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "../../stackslib/src/chainstate/stacks/boot/bns.clar"
clarity-version: 2
- emulated-contract-publish:
contract-name: bns_test
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "./tests/bns_test.clar"
clarity-version: 2
- emulated-contract-publish:
contract-name: pox-4
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "../../stackslib/src/chainstate/stacks/boot/pox-4.clar"
clarity-version: 2
- emulated-contract-publish:
contract-name: pox-mainnet
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "../../stackslib/src/chainstate/stacks/boot/pox-mainnet.clar"
clarity-version: 2
- emulated-contract-publish:
contract-name: pox_4_test
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "./tests/pox_4_test.clar"
clarity-version: 2
- emulated-contract-publish:
contract-name: signers
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "../../stackslib/src/chainstate/stacks/boot/signers.clar"
clarity-version: 2
- emulated-contract-publish:
contract-name: signers-voting
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: "../../stackslib/src/chainstate/stacks/boot/signers-voting.clar"
clarity-version: 2
epoch: "2.4"

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "Run unit tests on this project.",
"private": true,
"type": "module",
"scripts": {
"test": "vitest run -- --coverage",
"genhtml": "genhtml lcov.info --branch-coverage -o coverage/"
@@ -10,14 +11,14 @@
"author": "",
"license": "ISC",
"dependencies": {
"@hirosystems/clarinet-sdk": "^1.1.0",
"@hirosystems/clarinet-sdk": "^2.4.0-beta3",
"@stacks/clarunit": "0.0.1",
"@stacks/transactions": "^6.12.0",
"chokidar-cli": "^3.0.0",
"@stacks/clarunit": "0.0.1",
"fast-check": "^3.15.1",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.34.4",
"vitest-environment-clarinet": "^1.0.0"
"typescript": "^5.4.2",
"vite": "^5.1.6",
"vitest": "^1.3.1",
"vitest-environment-clarinet": "^2.0.0"
}
}
}

View File

@@ -1,7 +1,10 @@
/// <reference types="vitest" />
import { defineConfig } from "vite";
import { vitestSetupFilePath, getClarinetVitestsArgv } from "@hirosystems/clarinet-sdk/vitest";
import {
vitestSetupFilePath,
getClarinetVitestsArgv,
} from "@hirosystems/clarinet-sdk/vitest";
/*
In this file, Vitest is configured so that it works seamlessly with Clarinet and the Simnet.
@@ -11,7 +14,7 @@ import { vitestSetupFilePath, getClarinetVitestsArgv } from "@hirosystems/clarin
`vitestSetupFilePath` points to a file in the `@hirosystems/clarinet-sdk` package that does two things:
- run `before` hooks to initialize the simnet and `after` hooks to collect costs and coverage reports.
- load custom Vitest matchers to work with Clarity values (such as `expect(...).toBeUint()`).
- load custom vitest matchers to work with Clarity values (such as `expect(...).toBeUint()`)
The `getClarinetVitestsArgv()` will parse options passed to the command `vitest run --`
- vitest run -- --manifest ./Clarinet.toml # pass a custom path
@@ -21,7 +24,11 @@ import { vitestSetupFilePath, getClarinetVitestsArgv } from "@hirosystems/clarin
export default defineConfig({
test: {
environment: "clarinet", // use vitest-environment-clarinet
singleThread: true,
pool: "forks",
poolOptions: {
threads: { singleThread: true },
forks: { singleFork: true },
},
setupFiles: [
vitestSetupFilePath,
// custom setup files can be added here