(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestEnvironment_Constructors(t *testing.T) { |
| 13 | t.Run("reporter", func(t *testing.T) { |
| 14 | reporter := newMockReporter(t) |
| 15 | env := NewEnvironment(reporter) |
| 16 | env.chain.assert(t, success) |
| 17 | }) |
| 18 | |
| 19 | t.Run("config", func(t *testing.T) { |
| 20 | reporter := newMockReporter(t) |
| 21 | env := NewEnvironmentC(Config{ |
| 22 | Reporter: reporter, |
| 23 | }) |
| 24 | env.chain.assert(t, success) |
| 25 | }) |
| 26 | |
| 27 | t.Run("chain", func(t *testing.T) { |
| 28 | chain := newMockChain(t) |
| 29 | value := newEnvironment(chain) |
| 30 | assert.NotSame(t, value.chain, chain) |
| 31 | assert.Equal(t, value.chain.context.Path, chain.context.Path) |
| 32 | }) |
| 33 | } |
| 34 | |
| 35 | func TestEnvironment_Reentrancy(t *testing.T) { |
| 36 | reporter := newMockReporter(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…