mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 20:20:05 +00:00
3e71997290
* add time pkg * Go fmt
19 lines
412 B
Go
19 lines
412 B
Go
// Package testing includes useful mocks for slot tickers in unit tests.
|
|
package testing
|
|
|
|
import types "github.com/prysmaticlabs/eth2-types"
|
|
|
|
// MockTicker defines a useful struct for mocking the Ticker interface
|
|
// from the slotutil package.
|
|
type MockTicker struct {
|
|
Channel chan types.Slot
|
|
}
|
|
|
|
// C --
|
|
func (m *MockTicker) C() <-chan types.Slot {
|
|
return m.Channel
|
|
}
|
|
|
|
// Done --
|
|
func (m *MockTicker) Done() {}
|