gulp test --files does not work for test/functional/test-cid
What's the issue?
Using the --files flag for test/functional/test-cid produces spurious unit test breakages. .only works, but gives a much slower startup time.
How do we reproduce the issue?
gulp test --files=test/functional/test-cid.js --watch
What browsers are affected?
N/A
Which AMP version is affected?
This is a testing issue; no specific version of AMP is affected.
/cc @jridgewell
I don't experience this locally. Also you can use --nobuild for unit tests for a much faster run.
/to @rsimha
Some notes:
- Unit tests don't need a full
gulp build(takes 2-3 minutes), they only needgulp css(takes ~1 s). - You can tell
gulp testthat you're only running unit tests by passing in--unit. - You can avoid the annoying popup browser window by passing in
--headless. - You can avoid building by using
--nobuild(you wouldn't use this with--watch).
(I believe all this is stuff documented at the top when you run gulp test, and in the developer docs. Let me know if you have ideas for how to make the instructions more useful.)
@RJSumi The following command works for me. Can you try it and let me know what you see?
gulp test --headless --watch --unit --files test/functional/test-cid.js
Also, can you post a gist of the spurious unit test breakages? How slow is the startup time, and where does it look like it's waiting? Are you fully synced to HEAD? (There have been a bunch of test infra changes over the past couple days.)
Closing this. Please reopen if issues persist after you try what's in https://github.com/ampproject/amphtml/issues/14562#issuecomment-380930563