From 8fad9a5ecddc88d57a531e4b0084544984f23d25 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sat, 16 Jul 2022 18:13:16 -0400 Subject: Added profile and other missing configs --- .../node_modules/coc-go/lib/utils/tests.test.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .config/coc/extensions/node_modules/coc-go/lib/utils/tests.test.js (limited to '.config/coc/extensions/node_modules/coc-go/lib/utils/tests.test.js') diff --git a/.config/coc/extensions/node_modules/coc-go/lib/utils/tests.test.js b/.config/coc/extensions/node_modules/coc-go/lib/utils/tests.test.js new file mode 100644 index 0000000..70d0801 --- /dev/null +++ b/.config/coc/extensions/node_modules/coc-go/lib/utils/tests.test.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +const assert_1 = tslib_1.__importDefault(require("assert")); +const tests_1 = require("./tests"); +describe('extractFunctionName()', () => { + const cases = [ + ['', null], + ['\tfuncFoo()', null], + ['func Foo() {', 'Foo'], + ['func Foo() string {', 'Foo'], + ['func Foo(str string) string {', 'Foo'], + ['func (b *Bar) Foo(str string) string {', 'Foo'], + ]; + cases.forEach(([line, name]) => { + it(`should extract ${JSON.stringify(name)} from "${line}"`, () => { + assert_1.default.equal(name, (0, tests_1.extractFunctionName)(line)); + }); + }); +}); +//# sourceMappingURL=tests.test.js.map \ No newline at end of file -- cgit v1.2.3