Javascript 聚合物应用程序的正确文件夹结构是什么?

Javascript 聚合物应用程序的正确文件夹结构是什么?,javascript,polymer,web-component-tester,Javascript,Polymer,Web Component Tester,我有一个应用程序,里面有几个自定义元素,我正在编写测试,我不确定应该如何设置目录以便测试工作 是不是有点像: myApp myApp/bower_components myApp/test myApp/test/myApp myApp/test/myElement1 myApp/test/myElement2 myApp/test/myElement3 myApp/src myApp/src/myApp myApp/src/myElement1 myApp/src/myElement2 myAp

我有一个应用程序,里面有几个自定义元素,我正在编写测试,我不确定应该如何设置目录以便测试工作

是不是有点像:

myApp
myApp/bower_components
myApp/test
myApp/test/myApp
myApp/test/myElement1
myApp/test/myElement2
myApp/test/myElement3
myApp/src
myApp/src/myApp
myApp/src/myElement1
myApp/src/myElement2
myApp/src/myElement3  
myApp/demo
还是每个元素都有一个测试/子文件夹?像

myApp/src/myElement1/test
myApp/src/myElement2/test
myApp/src/myElement3/test

根据文档,每个元素都有一个测试文件夹,当您使用polymer Service时,可以通过浏览器访问该文件夹,如so
localhost:8080/components/my el/test/my-el_test.html

该测试应该位于与应用程序主目录分离的自己的文件夹中,以便于polymer CLI的构建过程。(准备好应用程序制作。)

推荐结构:
myApp/test/myElement1
myApp/src/myElement1

下面是商店应用程序中的polymer.json文件示例:((无测试文件夹))


谢谢你,乔尔。那么,当我想将浏览器转到localhost:8080/components/my el/test/my-el_test.html时,Polymer知道查看/test/my el/my-el_test.html吗?即使url没有相同的结构?这是一个好问题,不幸的是,我不知道答案。
polymer.json
{
  "entrypoint": "index.html",
  "shell": "src/shop-app.html",
  "fragments": [
    "src/shop-list.html",
    "src/shop-detail.html",
    "src/shop-cart.html",
    "src/shop-checkout.html",
    "src/lazy-resources.html"
  ],
  "sources": [
   "src/**/*",
   "data/**/*",
   "images/**/*",
   "bower.json"
  ],
  "extraDependencies": [
    "manifest.json",
    "bower_components/webcomponentsjs/webcomponents-lite.js"
  ],
  "lint": {
    "rules": ["polymer-2-hybrid"]
  }
}