You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.
I've recently made this extension a dependency of the IBM Blockchain extension (https://github.com/IBM-Blockchain/blockchain-vscode-extension) so first of all, thank you! This extension is a really useful tool for us to allow developers to run smart contract tests.
I find it doesn't work for typescript tests however, I see this:
import * as assert from 'assert';
^^^^^^
SyntaxError: Unexpected token import
I've played round with the mocha command that is run by the extension and I've found that I can get it working if I use the following: node_modules/.bin/_mocha -r ts-node/register <test_file>
Aside from adding in a compile/watch step somewhere before the tests are being run, does anyone have any other solutions to this problem?
The text was updated successfully, but these errors were encountered:
Ok, worked around this by making use of: "javascript-test-runner.additionalArgs": "-r ts-node/register" as it doesn't matter where the ts-node/register bit belongs in the command. Now the extension runs:
I think it would be good to get this fixed in the extension so that this command is run when typescript tests are detected? As an alternative to compiling the typescript.
I've recently made this extension a dependency of the IBM Blockchain extension (https://github.com/IBM-Blockchain/blockchain-vscode-extension) so first of all, thank you! This extension is a really useful tool for us to allow developers to run smart contract tests.
I find it doesn't work for typescript tests however, I see this:
I've played round with the mocha command that is run by the extension and I've found that I can get it working if I use the following:
node_modules/.bin/_mocha -r ts-node/register <test_file>
The text was updated successfully, but these errors were encountered: