Skip to content

Instantly share code, notes, and snippets.

@rsimha
Created April 11, 2018 15:59
Show Gist options
  • Save rsimha/9cce8fc819d3daf5943fd6f371d9c646 to your computer and use it in GitHub Desktop.
Save rsimha/9cce8fc819d3daf5943fd6f371d9c646 to your computer and use it in GitHub Desktop.
rsimha@bobdylan (master):~/src/amphtml$ gulp test --nobuild --unit --headless --files extensions/amp-subscriptions/0.1/test/test-viewer-tracker.js
[11:58:38] Using gulpfile ~/src/amphtml/gulpfile.js
[11:58:38] Starting 'test'...
[11:58:38] Run gulp help to see a list of all test flags.
[11:58:38] ⤷ Use --nohelp to silence these messages.)
[11:58:38] Running tests against unminified code.
[11:58:38] --nobuild: Skipping build.
[11:58:38] --unit: Running only the unit tests. Prerequisite: gulp css
[11:58:38] --headless: Running tests in a headless Chrome window.
[11:58:38] --files: Running tests in the file(s): extensions/amp-subscriptions/0.1/test/test-viewer-tracker.js
[11:58:38] Webserver started at http://localhost:31862
[11:58:38] Started test responses server on localhost:31862
[11:58:38] Running test. Press Ctrl + C to cancel...
Running tests locally...
START:
ViewerTracker
scheduleView
● should call `reportWhenViewed_`, if viewer is visible
● should call `reportWhenViewed_`, when viewer gets visible
reportWhenViewed_
● should call whenViewed_
whenViewed_
● should register "viewed" signal after timeout
● should register "viewed" signal after scroll
● should register "viewed" signal after click
ERROR: 'Unexpected call: error(Element expected: , [object HTMLDocument]) at reportError (http://localhost:9876/absolute/tmp/d7c095605fb67ceb3af2202c9dddf882.browserify?bc1ef78a20f90513cf36b9349714ca2334426269:37568:16)'
The test "ViewerTracker whenViewed_ should register "viewed" signal after click" resulted in a call to console.error.
⤷ If this is not expected, fix the code that generated the error.
⤷ If this is expected, use the following pattern to wrap the test code that generated the error:
'allowConsoleError(() => { <code that generated the error> });'
Finished in 1.129 secs / 1.01 secs @ 11:58:52 GMT-0400 (EDT)
SUMMARY:
● 6 tests completed
[11:58:52] Shutting down test responses server on localhost:31862
rsimha@bobdylan (master):~/src/amphtml$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment