Ad

How To Use Jasmine Spec Runner With Jest

- 1 answer

So, seeing that jest is built on top of jasmine, is there a way to use the jasmine spec runner to provide a more verbose result output for jest tests? The spec runner sample makes it look easy enough, but i'm not sure what all the dependencies would be.

  <link rel="shortcut icon" type="image/png" target="_blank" rel="nofollow noreferrer" href="lib/jasmine-1.3.0/jasmine_favicon.png">
  <link rel="stylesheet" type="text/css" target="_blank" rel="nofollow noreferrer" href="lib/jasmine-1.3.0/jasmine.css">
  <script type="text/javascript" src="lib/jasmine-1.3.0/jasmine.js"></script>
  <script type="text/javascript" src="lib/jasmine-1.3.0/jasmine-html.js"></script>

  <!-- include source files here... -->
  <script type="text/javascript" src="src/Player.js"></script>
  <script type="text/javascript" src="src/Song.js"></script>

  <!-- include spec files here... -->
  <script type="text/javascript" src="spec/SpecHelper.js"></script>
  <script type="text/javascript" src="spec/PlayerSpec.js"></script>
Ad

Answer

Jest is meant to be run in a node environment and does some heavy wrapping of Jasmine, so it is not possible to use the spec runner via jest in the browser at the moment.

There is a github issue requesting this feature, so i'd suggest making your voice heard there.

Ad
source: stackoverflow.com
Ad