0

Which ECMA java script standard does Nightwatch js supports in its latest release? I tried searching for this info in many other websites but couldn't get the same. Can anyone provide some info on this.

4
  • 1
    This is an invalid question. It's like asking: "If I print this document on my printer, what colour will the paper be?" ECMAScript adherance is only relevant for the browsers and for javascript compilers/polyfills Commented Dec 9, 2016 at 18:30
  • Its a valid question. I saw a documentation for Node js that its supports JacaScript ECMA-262 specifications. Links: nodejs.org/en/docs/es6 I want to know the same for Nightwatch js as its also built on Node js. Commented Dec 12, 2016 at 8:43
  • Node.js is standalone javascript runtime evaluation software. It's not a javascript library. In my analogy, Nightwatch js is the document, and Node.js is the printer. Commented Dec 14, 2016 at 6:38
  • Sorry for being obtuse to begin with. What I'm suggesting is that you should not confuse a library for a runtime environment. What I mean to say is; whether the browser supports ECMAScript 5 or ECMAScript 6 has nothing to do with the Nightwatch js libraries, it's purely about your code and your "environment". The question you want to ask is: "Should I write javascript code that is not ECMAScript 5 conformant?". Which is also the question that has been answered. Commented Dec 14, 2016 at 6:43

2 Answers 2

1

It is recommended to use Nightwatch.js with ECMAScript 5. However, if your team is shifting to ECMAScript 6, then you can integrate tools like Babel or Traceur(popular Javascript transpilers) into your project. Writing Nightwatch tests directly using ECMAScript 6 is not advisable at this stage because some versions of browsers still don't support the latest JS standard.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer.I read in nightwatch js email list saying some work is going around this.Not sure when this will be available to users.
Yes, it's probably going to take some time. They still have several unresolved issues on different browsers with the latest javascript standard.
0

It doesn't support ECMA 6.

Several people use a require babel on the header of the files since they had multiple issues creating Promises on top of Selenium, however, bugs are expected.

Reference

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.