   </script>
   """
 
+listTests = (tests, host, port) ->
+  for test in tests
+    console.log("http://#{host}:#{port}/#{test.replace(/\.js$/, "")}")
+
 commands =
 
   install: () ->

      .listen(port, host)
    console.log "serving at http://#{host}:#{port}"
    console.log "available tests:"
    listTests tests

  template: (cmd, args...) ->
    config = getConfig()

      src = join(component.path, sourceDirectory(component.path))
      name = componentName(null, component.json)
      installTo componentsDirName, argv.link, src, name
    if isComponent()
      installTo componentsDirName, argv.link, 'src', componentName()

  test: () ->
    port = process.env.PORT || 1335
    host = process.env.HOST || "localhost"
    components = allComponents()
    testDirName = testDirectory()
    staticDirName = join (if isComponent() then testDirName else ""), "static"
    return listTests(discoverTests(staticDirName), host, port) if argv.list
    commands.install()
    tests = discoverTests staticDirName
    extraHtml = getTestTemplate() + "\n" + stringBundlesAsRequirejsModule()
    testServer
