Skip to content

Commit

Permalink
Expose CoverageReport through Emulator interface
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Apr 25, 2023
1 parent acb82b9 commit 3e38f32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ import (
"context"
"errors"
"fmt"
"github.com/logrusorgru/aurora"
"strings"
"sync"
"time"

"github.com/logrusorgru/aurora"

"github.com/onflow/cadence"
"github.com/onflow/cadence/runtime"
"github.com/onflow/cadence/runtime/common"
Expand Down
6 changes: 6 additions & 0 deletions server/backend/emulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package backend

import (
"github.com/onflow/cadence/runtime"
"github.com/onflow/cadence/runtime/interpreter"
emulator "github.com/onflow/flow-emulator"
sdk "github.com/onflow/flow-go-sdk"
Expand All @@ -29,9 +30,14 @@ import (

// Emulator defines the method set of an emulated blockchain.
type Emulator interface {
// Debugger
SetDebugger(*interpreter.Debugger)
EndDebugging()

// CoverageReport
CoverageReport() *runtime.CoverageReport
SetCoverageReport(coverageReport *runtime.CoverageReport)

AddTransaction(tx sdk.Transaction) error
ExecuteNextTransaction() (*types.TransactionResult, error)
ExecuteBlock() ([]*types.TransactionResult, error)
Expand Down

0 comments on commit 3e38f32

Please sign in to comment.