Before adding support to more features to deno_emit, I wanted to first port the tests from deno bundle so that I know that the behavior is consistent with it and identify missing features.
This PR replaces the current test suite with tests ported and adapted from deno bundle's. Some tests are ignored because deno_emit doesn't support the corresponding feature yet. Note that I didn't include the tests related to type-checking, as it is out-of-scope now.
The PR also makes the following changes:
It adds the test utilities runModule() and runCode() which runs code with deno run and returns the output.
The format of the snapshots from testTranspile() has changed in order to allow running the code from the snapshots directly. This way, we don't have to setup a temporary directory (like we do with deno bundle's Rust test suite).
It adds the utility testTranspileAndBundle that tests with both. These common tests are put in common_test.ts. Notice that there are no remaining tests specific to transpile().
Before adding support to more features to
deno_emit
, I wanted to first port the tests fromdeno bundle
so that I know that the behavior is consistent with it and identify missing features.This PR replaces the current test suite with tests ported and adapted from
deno bundle
's. Some tests are ignored becausedeno_emit
doesn't support the corresponding feature yet. Note that I didn't include the tests related to type-checking, as it is out-of-scope now.The PR also makes the following changes:
runModule()
andrunCode()
which runs code withdeno run
and returns the output.testTranspile()
has changed in order to allow running the code from the snapshots directly. This way, we don't have to setup a temporary directory (like we do withdeno bundle
's Rust test suite).testTranspileAndBundle
that tests with both. These common tests are put incommon_test.ts
. Notice that there are no remaining tests specific totranspile()
.