mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Test that tern autocompletions work.
|
||||
*/
|
||||
|
||||
const tern = require("devtools/client/sourceeditor/tern/tern");
|
||||
const ecma5 = require("devtools/client/sourceeditor/tern/ecma5");
|
||||
|
||||
function run_test() {
|
||||
do_test_pending();
|
||||
|
||||
const server = new tern.Server({ defs: [ecma5] });
|
||||
const code = "[].";
|
||||
const query = { type: "completions", file: "test", end: code.length };
|
||||
const files = [{ type: "full", name: "test", text: code }];
|
||||
|
||||
server.request({ query: query, files: files }, (error, response) => {
|
||||
do_check_eq(error, null);
|
||||
do_check_true(!!response);
|
||||
do_check_true(Array.isArray(response.completions));
|
||||
do_check_true(response.completions.indexOf("concat") != -1);
|
||||
do_test_finished();
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue