* 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
14 lines
483 B
JavaScript
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");
|
|
});
|