`flow test` should deploy smart contracts defined in flow.json
@jribbink ya está trabajando en esto.
Desde el 8/2/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Instructions
Issue To Be Solved
Currently we need to explicitly deploy a smart contract in the cadence unit or integration tests, e.g.:
import "FLIXRegistry"
...
...
access(all)
fun setup() {
let flixRegistryErr = Test.deployContract(
name: "FLIXRegistry",
path: "../contracts/flix_registry.cdc",
arguments: []
)
...
In the above example FLIXRegistry cannot be referenced in the code before it was deployed with Test.deployContract, even if it is imported on the the top, and defined in the flow.json as follows:
{
"contracts": {
"FLIXRegistry": {
"source": "cadence/contracts/flix_registry.cdc",
"aliases": {
"emulator": "0xf8d6e0586b0a20c7",
"testing": "0x0000000000000007"
}
},
...
(Optional): Suggest A Solution
It could increase developer experience if smart contracts defined in the flow.json are readily available in the unit tests, so the developers only have to import those as dependencies.
Also it could keep the unit tests code more concise and clean.
(Optional): Context
- Lenguaje dominante
- Go
- Estrellas
- 209
- Forks
- 88
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de onflow/flow-cli
-
Simplify MCP contract sorting with slices helpersPosiblemente ocupada @luangucun la tomó hace 50 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
`flow cadence lint` lints importsPosiblemente ocupada @holyfuchs la tomó hace 189 días. AbiertoBug Improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Bug
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
-
flow test prints unreadable outputPosiblemente ocupada @holyfuchs la tomó hace 187 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Feature
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Todos los issues de onflow/flow-cli
Issues similares
-
native
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
prime-radiant-inc/evener#4839 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
521xueweihan/HelloGitHub#4073 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
goharbor/terraform-provider-harbor#655 · 1 comentario ·
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
syncthing/syncthing#10935 · 1 comentario ·
Los mantenedores suelen responder en 1 día