Files
test-repo/tests_integration/__tests__/util-shared.js
T
Christian Zosel fac08034e7 Split out location extraction into plugin config (#3777)
* Split out location extraction into plugin config

* Reduce set of exported function, rebase to current master

* Pass custom locStart/locEnd fn's directly to affected methods

* (wip) always use locStart/locEnd from plugin

* Convert graphql implementation

* Convert HTML implementation

* (wip) convert JS implementation

* Remove unused variables

* Continue conversion of JS implementation

* Replace "util.locStart" with direct call to "options.locStart"

* Remove util closure

* Add unit test for structure of shared util

* Fix linting error, simplify locStart/End implementations
2018-02-09 23:17:48 +11:00

14 lines
483 B
JavaScript

"use strict";
const sharedUtil = require("../../src/common/util-shared");
test("shared util has correct structure", () => {
expect(typeof sharedUtil.isNextLineEmpty).toEqual("function");
expect(typeof sharedUtil.isNextLineEmptyAfterIndex).toEqual("function");
expect(typeof sharedUtil.getNextNonSpaceNonCommentCharacterIndex).toEqual(
"function"
);
expect(typeof sharedUtil.mapDoc).toEqual("function");
expect(typeof sharedUtil.makeString).toEqual("function");
});