Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How are we supposed to setup tests? #81

Closed
kevinwestern opened this issue Dec 10, 2014 · 2 comments
Closed

Question: How are we supposed to setup tests? #81

kevinwestern opened this issue Dec 10, 2014 · 2 comments

Comments

@kevinwestern
Copy link
Contributor

I'm not sure what the directory structure setup is supposed to look like for testing.

I currently clone this component to my local machine then run bower install. However, the test files are referring to files that aren't in bower_components and don't exist within this component's directory (e.g. https://github.com/GoogleWebComponents/google-map/blob/master/test/google-map-basic.html#L7). The html files themselves refer to files that aren't in this component's directory (https://github.com/GoogleWebComponents/google-map/blob/master/google-map.html#L3).

I understand that the ../pathto/file.html is written that way because it expects to be in the same directory (e.g. /bower_components/).

This makes testing a bit odd and results in a noisy dev console when these files aren't found. What's the strategy supposed to be here?

@kevinwestern
Copy link
Contributor Author

Also, loading the demo page produces these errors in the console (again, because of the imports):

GET http://localhost:8000/webcomponentsjs/webcomponents.min.js
demo.html:54 GET http://localhost:8000/polymer/polymer.html
demo.html:54 GET http://localhost:8000/google-apis/google-apis.html
google-map.html:48 Uncaught ReferenceError: Polymer is not defined
google-map.html:319 Uncaught ReferenceError: Polymer is not defined
google-map-directions.html:47 Uncaught ReferenceError: Polymer is not defined
google-map-search.html:42 Uncaught ReferenceError: Polymer is not defined

@kevinwestern
Copy link
Contributor Author

I ended up using the following steps, which still feel odd:

  1. bower install google-map
  2. cd google-map
  3. git clone https://github.com/kevinwestern/google-map local
  4. python -m SimpleHTTPServer
  5. Open chrome to http://localhost:8000/local/demo.html

This approach of assuming your dependencies will be one level up feels unstable and messy. I wonder if there's a better way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant