1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-28 08:48:48 +02:00

Тест подсказки директив компиляции #300

This commit is contained in:
salexdv 2022-11-14 08:54:20 +03:00
parent 5296b49a3b
commit 851fbd36c2

View File

@ -1157,6 +1157,29 @@ describe("Проверка автокомлита и подсказок реда
}); });
it("проверка подсказки директив компиляции", function () {
bsl = helper('&');
let suggestions = bsl.getCodeCompletion({ triggerCharacter: '&' });
expect(suggestions).to.be.an('array').that.not.is.empty;
assert.equal(suggestions.some(suggest => suggest.label === "НаСервере"), true);
bsl = helper('&');
suggestions = bsl.getCodeCompletion({ triggerCharacter: '' });
expect(suggestions).to.be.an('array').that.not.is.empty;
assert.equal(suggestions.some(suggest => suggest.label === "НаСервере"), true);
bsl = helper('&На');
suggestions = bsl.getCodeCompletion({ triggerCharacter: '' });
expect(suggestions).to.be.an('array').that.not.is.empty;
assert.equal(suggestions.some(suggest => suggest.label === "НаСервере"), true);
bsl = helper('На &');
suggestions = bsl.getCodeCompletion({ triggerCharacter: '' });
expect(suggestions).to.be.an('array').that.is.empty;
});
} }
mocha.run(); mocha.run();