hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

Babel support #28

Closed momegas closed 5 years ago

momegas commented 5 years ago

Hello, i tried using this tool in a project that uses node and babel and i see it does not work out of the box.

Am i missing something? If not could support for babel be added?

Thank you. Nice tool btw :+1:

hbenl commented 5 years ago

How do you start the tests on the command line?

momegas commented 5 years ago

Hello, thanks for the quick response.

like this: nodemon --exec babel-node --presets env,stage-2 run-tests.js

and in run-tests.js:

import Jasmine from 'jasmine'

const jasmine = new Jasmine()
jasmine.loadConfigFile('jasmine.json')
jasmine.execute()
hbenl commented 5 years ago

You'll need to setup your project so that the tests can be run by calling jasmine on the command line directly.

For example, this repo uses babel and jasmine and works with this extension as soon as I tell it where it can find jasmine.json by adding "jasmineExplorer.config": "test/unit/jasmine.json" to the settings.