mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-07-11 06:31:23 -05:00
Previously, we used the `eval` hack to "import" our code into test files. The biggest problem with that approach is that we don't get line numbers. Now, we're assigning relevant variables to globals in Node.js for tests. It's ugly, but it works. There's no simple way to import local variables only if we're in Node. Ideally, we'd build this in two different ways: A .mjs file for Node, and a .js file for the browser. Or maybe use UMD. I'll figure it out later, I guess. |
||
|---|---|---|
| .. | ||
| battle-test.test.js | ||
| parse | ||