We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f64c55 commit 2cbcc70Copy full SHA for 2cbcc70
spawn_config_test.go
@@ -32,9 +32,15 @@ import (
32
)
33
34
func TestSpawnOption(t *testing.T) {
35
- config := &spawnConfig{}
36
- second := time.Second
37
- option := WithPassivateAfter(second)
38
- option.Apply(config)
39
- require.Equal(t, &spawnConfig{passivateAfter: second}, config)
+ t.Run("WithPassivateAfter with options", func(t *testing.T) {
+ config := newSpawnConfig(WithPassivateAfter(time.Second))
+ require.EqualValues(t, time.Second, config.passivateAfter)
+ })
+ t.Run("WithPassivateAfter with Apply", func(t *testing.T) {
40
+ config := &spawnConfig{}
41
+ second := time.Second
42
+ option := WithPassivateAfter(second)
43
+ option.Apply(config)
44
+ require.Equal(t, &spawnConfig{passivateAfter: second}, config)
45
46
}
0 commit comments