This repository was archived by the owner on Aug 3, 2023. It is now read-only.
Insights from dogfooding #1
wojpawlik
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
deno.ns/tools/run_deno_unit_tests.ts->deno.ns/tools/deno_test.js->@fromdeno/cache/node/dtest.mjs->fdtdeno.nsdoesn't use URL imports, soNODE_OPTIONS=--experimental-loader=ts-node/esm fdtworked great for testing TypeScript code, without explicit build step.fdtuses dynamic import to load test files in order to support ESM, so modifyingrequire.extensionsvia--require=ts-node/registeror--require=sucrase/register/tsisn't supported.required from CJS tho.deno.nsfirst "test file" contains no tests. Instead, it sets globals required by subsequent tests and changes working directory. I expect this to be common pattern until I manage to isolate test files form each other in a major release.@fromdeno/cachedoes use URL imports, so it usesdeno2nodeto build the test files (intoout/test/) alongside source (intoout/src/). Tests on Node.js are ran after build, in preposterous"postprepare"script :)src/andtest/simultaneously, enable"composite". Otherwise, TypeScript may buildsrc/intoout/instead ofout/src/when you don't build tests, breaking your package.Beta Was this translation helpful? Give feedback.
All reactions