MCPcopy
hub / github.com/cortesi/modd / TestWatch

Function TestWatch

modd_test.go:135–227  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

133}
134
135func TestWatch(t *testing.T) {
136 t.Run(
137 "single",
138 func(t *testing.T) {
139 _testWatch(
140 t,
141 func() { touch("a/touched") },
142 []string{
143 ":all: ./a/initial",
144 ":a: ./a/initial",
145 ":skipit: ./a/touched",
146 ":all: ./a/touched",
147 ":a: ./a/touched",
148 },
149 )
150 },
151 )
152 t.Run(
153 "double",
154 func(t *testing.T) {
155 _testWatch(
156 t,
157 func() {
158 touch("a/touched")
159 touch("b/touched")
160 },
161 []string{
162 ":all: ./a/initial",
163 ":a: ./a/initial",
164 ":skipit: ./a/touched ./b/touched",
165 ":all: ./a/touched ./b/touched",
166 ":a: ./a/touched",
167 ":b: ./b/touched",
168 },
169 )
170 },
171 )
172 t.Run(
173 "inner",
174 func(t *testing.T) {
175 _testWatch(
176 t,
177 func() {
178 touch("a/inner/touched.xxx")
179 },
180 []string{
181 ":all: ./a/initial",
182 ":a: ./a/initial",
183 ":skipit: ./a/inner/touched.xxx",
184 ":all: ./a/inner/touched.xxx",
185 ":c: ./a/inner/touched.xxx",
186 },
187 )
188 },
189 )
190 t.Run(
191 "direct",
192 func(t *testing.T) {

Callers

nothing calls this directly

Calls 3

_testWatchFunction · 0.85
touchFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected