I have some code in my TypeScript tests, say:
function foo() {
return 'bar';
}
which I'd like to share with all my tests. The simple solution is to copy the function into each *_test.ts file.
How can I "import" this code from foo_test_helper.ts
in a truffle test?
If possible, I'd like to avoid adding Babel to my build. It should work with a project created by npx truffle init
. If you suggest Babel, then please include (pointers to) the instructions necessary to set this up.