Closed rogemita closed 10 years ago
Can you remember me what was the goal to run unit tests separately? We probably discussed it but I don't remember anymore (bad memory!).
the idea is distinguish them in order to be able to run unit tests while developing. Being, the unit ones, faster and not sugar shell dependent, a developer may run these tests in other browser and without needing to run slower tests (with big timeouts). Letting the whole tests run to the final stage of developing.
It would be nice if we could avoid duplication. Maybe we can use require?
https://github.com/karma-runner/karma/issues/294
The links are all broken but it seems like it should be possible.
It would be nice if we could avoid duplication. Maybe we can use require?
This is a great idea! roger is taking next week off, so I'll get this from now on. I'll make a refactor using something like this https://github.com/angular/angular.js/blob/master/karma-e2e.conf.js#L1
for completeness to you previous question:
Can you remember me what was the goal to run unit tests separately?
osbuild check
takes "real 2m31.455s" in mi laptop (which is a fast one)
I'd like to have an osbuild fast-check
which takes < 30s that would run unit tests and linters (pep8, js-beautify, etc) without smoke test and heavy ones.
What do you think, @dnarvaez?
Yes I like the idea, maybe osbuild check --fast.
osbuild check --fast
+1, even better.
Closing since it needs work.
we take advantage to analyze this points:
Q: where placing this "only-unit-tests karma config"? A: I was thinking that to move it to "unit" directory
Q: How run it? A: For now we can run it, entering on osbuild shell and karma start .../karma-unit.conf.js, I think is enough at the moment. Should we add this to documentation?
Q: Should we do same with functional tests? A: I think is ok with karma.conf.js file
Q: What do with "graphics" tests? A: I think that we need to move it to "unit" directory, deleting or no grapichs directory level, it's the same for me.
NOTE: I not found any doc with "exclude" key in "files" patterns config key, I think is ignored now this "exclude key" https://github.com/sugarlabs/sugar-web/blob/master/test/karma.conf.js#L25