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
Stumbled on this very cool project today. Another option could be @web/test-runner. I tinkered around with it today but ran into some issues with type-only imports and ESM. Each test needs to be converted into it's own independent entry-point, e.g.,
// src/tests/TestFloat.tsimport*astifrom"../taichi"import{assertEqual}from"./Utils"// test is mocha globaltest("testFloat",()=>{// test});
// web-test-runner.config.mjsimport{esbuildPlugin}from"@web/dev-server-esbuild";import{fromRollup}from"@web/dev-server-rollup";importtaichifrom"./rollup/rollup-plugin-taichi/src/index.mjs";// converted to ESM, with JSDoc annotations/** @type {import('@web/test-runner').TestRunnerConfig} */exportdefault{files: "./src/tests/Test*.ts",nodeResolve: {browser: true},plugins: [esbuildPlugin({ts: true,target: "auto"}),fromRollup(taichi),],};
taichi.js heavily depends on WebGPU, which makes running tests very difficult.
Currently, the only way to run test is via the browser. More specifically, you need to do
and then visit
127.0.0.1:8080/tests
Very recently, deno.ts has introduced WebGPU support, so it would be great if we could use that to run tests locally via a
npm run tests
command.The text was updated successfully, but these errors were encountered: