Ad
How To Use Jasmine Spec Runner With Jest
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
Related Questions
- → React components not works in RequireJS+Jasmine unit tests
- → multiCapabilities and jasmine focused tests
- → how to include module in angualar js to remove error module not found?
- → React shallow rendering generates component with type == Function instead of type == <ComponentName>
- → Jasmine return rejected in a mocked factory's promise
- → requirejs confilcts with define/require functions
- → Error when trying to unit test a basic service on AngularJS
- → How to write a leap year algorithm in Javascript with TDD?
- → Karma unit testing: Module name "react" has not been loaded yet for context: _. Use require([])
- → how to use HttpBackend for the $http
- → Writing Unit Tests for Form Elements
- → Angular Jasmine SpyOn $resource Handle Errors
- → Vue.js - Data lost in karma/phantomjs tests
Ad