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
Come up with a way to compile each of our tests along with our code, and run those tests in a browser using karma. This will ensure that users who bundle our code with closure do not run into any issues.
Should be distinct from npm test, but should run on CI.
The text was updated successfully, but these errors were encountered:
Basically I updated the rewriter script to support the unit tests too.
At first I tried just leaving everything as es6 modules, but the compiler seemed to have problems correctly calculating dependencies between modules.
So for the packages and test helpers the script converts them to use goog.module.
The script doesn't properly handle "export function foo()...", so I also updated the helpers to just do "function foo(){} export {foo}".
I left the .test.js files as es6 modules, because the compiler automatically treats es6 modules with no exports as entry points. Seemed a lot cleaner than passing in a ton of entry points.
I don't really understand how you're trying to handle externs: how are you supposed to package up an external library with these goog.provides? Also the script was generating nonsense for the unit test libraries like chai, so I converted it to handle them the way I'm used to: you include the browser version of chai.js on the page before the unit tests and just refer to the chai global.
I'm using Bazel to compile the javascript because it's what I'm used to, but I'm sure you can get it working in a shell script if you don't want to add that dependency.
I got the animation tests passing in chrome compiled with this. But there's more that needs to be fixed to get the rest working.
Come up with a way to compile each of our tests along with our code, and run those tests in a browser using karma. This will ensure that users who bundle our code with closure do not run into any issues.
Should be distinct from
npm test
, but should run on CI.The text was updated successfully, but these errors were encountered: