polymer icon indicating copy to clipboard operation
polymer copied to clipboard

How can I run unit test in polymer/test/unit/***.html

Open hexiaoting opened this issue 4 years ago • 4 comments

I'm new to polymer, I donot know how to run unit test in this repo. When I open these ***.html files with chrome directly, nothing showed. Any advice? Is there any document?

hexiaoting avatar May 08 '20 03:05 hexiaoting

Hi @hexiaoting. There are instructions for running the unit tests here:

https://github.com/Polymer/polymer/blob/master/CONTRIBUTING.md#unit-tests

I'm not sure when those instructions were last updated--please let us know if they don't work for you.

If you're creating a new project from scratch, I'd recommend starting with LitElement instead.

arthurevans avatar May 08 '20 04:05 arthurevans

@arthurevans thank you. I follow the above link to run test:

(jupyter-dev) [root@hwtnode polymer]# yarn install

(jupyter-dev) [root@hwtnode polymer]# polymer serve --npm -H 0.0.0.0 -p 15130
info:	Files in this directory are available under the following URLs
      applications: http://0.0.0.0:15130
      reusable components: http://0.0.0.0:15130/components/@polymer/polymer/

But still cannot access it sucessfully. The error message is

GET http://10.60.1.80:15130/@webcomponents/webcomponentsjs/webcomponents-lite.js net::ERR_ABORTED 404 (Not Found)
GET http://10.60.1.80:15130/@polymer/iron-component-page/iron-component-page.js net::ERR_ABORTED 404 (Not Found)

The file "webcomponents-lite.js" doesnot exist on node_modules. The file "iron-component-page.js" exists with the path: node_modules/@polymer/iron-component-page/iron-component-page.js

Can you help me ?

hexiaoting avatar May 08 '20 06:05 hexiaoting

image

image

hexiaoting avatar May 08 '20 06:05 hexiaoting

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 02 '21 16:06 stale[bot]