tree: 26a1e402e82e1b134ecacc24ac86000c21eae359 [path history] [tgz]
  1. BUILD.bazel
  2. index.bzl
  3. index.ts
  4. karma.conf.js
  5. README.md
  6. tsconfig.json
infra-sk/karma_mocha_test/README.md

karma_mocha_test

This directory contains the karma_mocha_test Bazel rule, which is based on the karma_web_test rule defined here.

The reason the karma_mocha_test rule is necessary is because most JavaScript / TypeScript tests in this reposiory are written for the Mocha test framework, whereas the karma_web_test rule makes the hard assumption that tests are written for the Jasmine framework, and does not provide a mechanism to override this.

The contents of this directory are copied from the //packages/karma directory in the [rules_nodejs]((https://github.com/bazelbuild/rules_nodejs) repository with minimal changes to replace Jasmine with Mocha and to remove some features we do not need.

In the future we might consider migrating our tests to Jasmine so we can use the standard karma_web_test rule and delete this directory.