Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-go / lib / utils / tests.test.js
1 "use strict";
2 Object.defineProperty(exports, "__esModule", { value: true });
3 const tslib_1 = require("tslib");
4 const assert_1 = tslib_1.__importDefault(require("assert"));
5 const tests_1 = require("./tests");
6 describe('extractFunctionName()', () => {
7     const cases = [
8         ['', null],
9         ['\tfuncFoo()', null],
10         ['func Foo() {', 'Foo'],
11         ['func Foo() string {', 'Foo'],
12         ['func Foo(str string) string {', 'Foo'],
13         ['func (b *Bar) Foo(str string) string {', 'Foo'],
14     ];
15     cases.forEach(([line, name]) => {
16         it(`should extract ${JSON.stringify(name)} from "${line}"`, () => {
17             assert_1.default.equal(name, tests_1.extractFunctionName(line));
18         });
19     });
20 });
21 //# sourceMappingURL=tests.test.js.map