2

I don't quite understand how magento2 implements tests in javascript.

From this doc: http://devdocs.magento.com/guides/v2.1/extension-dev-guide/test/test_js-unit.html it looks like it is possible to run javascript tests only though phpstorm?

If yes, is it possible to use some hacks to simulate the tests using just a text editor and command line? (I just don't understand why you need a specific IDE to develop with magento2)

asked Jul 26, 2016 at 13:12

1 Answer 1

1

FTA: "After you run the PHP interpreter once to run unit tests, you can run the JavaScript unit tests from the PhpStorm IDE."

It is saying you have to run it once OUTSIDE of PhpStorm, then you can run it inside of PhpStorm. So the tests are not tied to a specific IDE. I would suggest reading the whole document through to understand how to run the tests. (Specifically: http://devdocs.magento.com/guides/v2.1/extension-dev-guide/test/test_js-unit.html#run-js-unit-tests where it talks about running the tests from the command line)

answered Aug 31, 2016 at 21:46
4
  • the command line is using JsTestDriver which is found in jetbrains IDEs... Commented Sep 1, 2016 at 9:18
  • No, it says: "If found, the script uses the custom jsTestDriver.php configuration file. Otherwise, the script uses the default jsTestDriver.php.dist configuration file." jsTestDriver.php.dist is included in dev/tests/js/JsTestDriver/jsTestDriver.php.dist Commented Sep 1, 2016 at 15:08
  • jsTestDriver is a Google Code product, not JetBrains: code.google.com/archive/p/js-test-driver JetBrains has just included support for it in PhpStorm and its other IDEs. Commented Sep 1, 2016 at 15:14
  • 1
    Here is a blog post that provides a walkthrough of using jsTestDriver and has no mention of PhpStorm: danieldyba.com/blog/2013/05/08/… Commented Sep 1, 2016 at 15:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.