index.js 1.0 KB

12345678910111213141516171819202122
  1. 'use strict';
  2. // Tests specific to the API exposed inside the hljs object.
  3. // Right now, that only includes tests for several common regular expressions.
  4. require('./api');
  5. // Tests for auto detection of languages via `highlightAuto`.
  6. require('./detect');
  7. // HTML markup tests for particular languages. Usually when there is an
  8. // incorrect highlighting of one language, once the bug get fixed, the
  9. // expected markup will be added into the `test/markup` folder to keep
  10. // theses highlighting errors from cropping up again.
  11. require('./markup');
  12. // Tests meant for the browser only. Using the `test/fixtures/index.html` file
  13. // along with `jsdom` these tests check for things like: custom markup already
  14. // existing in the code being highlighted, blocks that disable highlighting,
  15. // and several other cases. Do note that the `test/fixtures/index.html` file
  16. // isn't actually used to test inside a browser but `jsdom` acts as a virtual
  17. // browser inside of node.js and runs together with all the other tests.
  18. require('./special');