Nightwatch: Error is swallowed on syntax errors

Created on 22 Feb 2017  Â·  4Comments  Â·  Source: nightwatchjs/nightwatch

module.export = {

  'Login page contains a section': function(browser) {

    /*jshint expr: true */

    var page = browser.page.Login();

    var footer = page.section.footer;

    page
      .navigate()
      .assert.loginSuccess();

    page.expect.section('@loginForm').to.be.preent;  // <--- notice the typo here
    page.expect.section('@loginForm').to.be.visible;
  });
}

Running this will produce output similar to

$ grunt nightwatch --tag login

Running "nightwatch" task

[Test Login] Test Suite
===========================

Running:  Login page contains a section
 ✔ Passed [ok]: Cookie deleted ..
 ✔ Testing if URL contains "jsf/login.jsf".

No option, neither silent:false nor any other setting lead me to the error.
Any chance to make this transparent some how ?

regards
~david

bug

Most helpful comment

Is this being worked on? It wastes a lot of time have to manually look for syntax errors in yours tests with no help at all from Nightwatch.

All 4 comments

@beatfactor Any news on this ?

Is this being worked on? It wastes a lot of time have to manually look for syntax errors in yours tests with no help at all from Nightwatch.

running node node_modules/nightwatch/bin/runner.js can help spot certain syntax and type errors

Should be fixed in v1.0.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

betweenbrain picture betweenbrain  Â·  4Comments

bushev picture bushev  Â·  4Comments

lgaticaq picture lgaticaq  Â·  3Comments

chaseconey picture chaseconey  Â·  4Comments

antogyn picture antogyn  Â·  4Comments