"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* --------------------------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 * ------------------------------------------------------------------------------------------ */
const chai_1 = require("chai");
const vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument");
const constants_1 = require("../constants");
const lsp_server_1 = require("../lsp-server");
describe('Flink Completion Test', () => {
    it('should suggest simple Flink DQL', () => {
        const uri = 'test://test.sql';
        const content = 'insert ';
        const textDocument = vscode_languageserver_textdocument_1.TextDocument.create(uri, constants_1.LANGUAGE_ID, 0, content);
        const lspServer = new lsp_server_1.LSPServer();
        lspServer.warehouse.setParsingValue(textDocument);
        const actual = lspServer.doCompletion(textDocument, {
            line: 0,
            character: content.length
        });
        const suggestions = actual.completionItems.map(i => i.label);
        (0, chai_1.expect)(actual.identifiers.length).to.equal(0);
        (0, chai_1.expect)(actual.completionItems.length).to.equal(2);
        (0, chai_1.expect)(suggestions).to.deep.equal(['INTO', 'OVERWRITE']);
    });
});
//# sourceMappingURL=completion.test.js.map