Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Running unit tests and integration tests #20

Open
2 tasks
GoogleCodeExporter opened this issue Apr 1, 2015 · 9 comments
Open
2 tasks

Running unit tests and integration tests #20

GoogleCodeExporter opened this issue Apr 1, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Apr 1, 2015

Great library. How to run the tests?


Original issue reported on code.google.com by mart...@enketo.org on 11 Mar 2015 at 6:03

  • Add a method to run the integration tests.
  • Add a method to run the unit tests.
@GoogleCodeExporter
Copy link
Author

(I mean without opening each html file in /test). I'm wondering if there is a 
way to run all of them at once, in phantomJS ideally.

Original comment by mart...@enketo.org on 12 Mar 2015 at 3:19

  • Added labels: ****
  • Removed labels: ****

@Dominator008
Copy link
Contributor

Internally at Google, the tests are run with Bazel using rules similar to those in https://github.com/bazelbuild/rules_closure. I will see if those rules can be used to run the tests in this project.

@ScottFreeCode
Copy link
Contributor

Is the difference between the test.js filename and test_js_deps.js referenced in the pages significant?

@Dominator008
Copy link
Contributor

@ScottFreeCode Yes they are different. test.js contains the utilities for running the tests, while test_js_deps.js is an automatically generated file specifying what to goog.require. Unfortunately I don't have access to this file now. Even if I did, I don't think it can be added to the repository easily. For now, I guess you can comment out the line

<script src="./test_js_deps.js"></script>

, see what namespaces are missing, and include them manually.

@ScottFreeCode
Copy link
Contributor

Alright, finally got it working; thanks!

@Dominator008
Copy link
Contributor

@ScottFreeCode Good to hear!

@bedney
Copy link

bedney commented May 30, 2016

I'm still a bit confused here. So is there a way to run the tests automatically out of the box or do we have to run them one at a time? Is there additional software to install? If so, can it be added to the devDependencies and the gulp file updated so that it can basically be a single command to run all tests?

@Dominator008
Copy link
Contributor

@bedney I'm working on a workflow that will allow running tests out of the box.

@bedney
Copy link

bedney commented Jun 1, 2016

@Dominator008 - Thank you sir! I appreciate it!

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

No branches or pull requests

4 participants