@@ -1,7 +1,6 @@
1package skills
1package skills
6 "path/filepath"
5 "path/filepath"
@@ -216,7 +215,8 @@ func TestSkillValidate(t *testing.T) {
218func TestDiscover(t *testing.T) {
217func TestDiscover(t *testing.T) {
219− // Not parallel: shares global broker with other Discover tests.
218+ t.Parallel()
220 tmpDir := t.TempDir()
220 tmpDir := t.TempDir()
222 // Create valid skill 1.
222 // Create valid skill 1.
@@ -248,14 +248,8 @@ description: Name doesn't match directory.
249`), 0o644))
249`), 0o644))
251− ctx, cancel := context.WithCancel(context.Background())
251+ skills, states := DiscoverWithStates([]string{tmpDir})
253− ch := SubscribeEvents(ctx)
255− skills := Discover([]string{tmpDir})
258− states := evt.Payload.States
259 var normalCount int
253 var normalCount int
260 var errorCount int
254 var errorCount int
261 var hasInvalidDir bool
255 var hasInvalidDir bool
@@ -285,32 +279,20 @@ description: Name doesn't match directory.
287func TestDiscoverEmptyDir(t *testing.T) {
281func TestDiscoverEmptyDir(t *testing.T) {
288− // Not parallel: shares global broker with other Discover tests.
282+ t.Parallel()
290 tmpDir := t.TempDir()
284 tmpDir := t.TempDir()
292− ctx, cancel := context.WithCancel(context.Background())
294− ch := SubscribeEvents(ctx)
296− skills := Discover([]string{tmpDir})
286+ skills, states := DiscoverWithStates([]string{tmpDir})
299− require.Empty(t, evt.Payload.States)
287+ require.Empty(t, states)
300 require.Empty(t, skills)
288 require.Empty(t, skills)
303func TestDiscoverMissingPath(t *testing.T) {
291func TestDiscoverMissingPath(t *testing.T) {
304− // Not parallel: shares global broker with other Discover tests.
292+ t.Parallel()
306− ctx, cancel := context.WithCancel(context.Background())
308− ch := SubscribeEvents(ctx)
310− skills := Discover([]string{filepath.Join(t.TempDir(), "missing")})
312− evt := <-ch
294+ skills, states := DiscoverWithStates([]string{filepath.Join(t.TempDir(), "missing")})
313− require.Empty(t, evt.Payload.States)
295+ require.Empty(t, states)
314 require.Empty(t, skills)
296 require.Empty(t, skills)