mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Re-enable some tests
This commit is contained in:
1 parent
f80c0c9d98
commit
7fc2bd15cb
1 file changed
+26
-36
@@ -42,7 +42,7 @@ define(function (require, exports, module) {
|
||||
HintUtils = require("HintUtils"),
|
||||
HintUtils2 = require("HintUtils2"),
|
||||
ParameterHintManager = require("ParameterHintManager");
|
||||
|
||||
|
||||
var extensionPath = FileUtils.getNativeModuleDirectoryPath(module),
|
||||
testPath = extensionPath + "/unittest-files/basic-test-files/file1.js",
|
||||
testHtmlPath = extensionPath + "/unittest-files/basic-test-files/index.html",
|
||||
@@ -471,7 +471,7 @@ define(function (require, exports, module) {
|
||||
expectNoHints(JSCodeHints.jsHintProvider);
|
||||
});
|
||||
|
||||
xit("should list declared variable and function names in outer scope", function () {
|
||||
it("should list declared variable and function names in outer scope", function () {
|
||||
testEditor.setCursorPos({ line: 6, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
hintsPresent(hintObj, ["A2", "A3", "funB", "A1"]);
|
||||
@@ -489,19 +489,19 @@ define(function (require, exports, module) {
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
hintsPresent(hintObj, ["break", "case", "catch"]);
|
||||
});
|
||||
/*
|
||||
it("should list explicitly defined globals from JSLint annotations", function () {
|
||||
|
||||
xit("should list explicitly defined globals from JSLint annotations", function () {
|
||||
testEditor.setCursorPos({ line: 6, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
hintsPresent(hintObj, ["brackets", "$"]);
|
||||
});
|
||||
|
||||
it("should list implicitly defined globals from JSLint annotations", function () {
|
||||
xit("should list implicitly defined globals from JSLint annotations", function () {
|
||||
testEditor.setCursorPos({ line: 6, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
hintsPresent(hintObj, ["alert", "console", "confirm", "navigator", "window", "frames"]);
|
||||
});
|
||||
*/
|
||||
|
||||
it("should NOT list implicitly defined globals from missing JSLint annotations", function () {
|
||||
testEditor.setCursorPos({ line: 6, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
@@ -549,13 +549,13 @@ define(function (require, exports, module) {
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
hintsPresent(hintObj, ["B1", "B2", "funC", "paramB1", "paramB2", "funB", "A1", "A2", "A3"]);
|
||||
});
|
||||
/*
|
||||
it("should list string literals that occur in the file", function () {
|
||||
|
||||
xit("should list string literals that occur in the file", function () {
|
||||
testEditor.setCursorPos({ line: 12, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
hintsPresent(hintObj, ["use strict"]);
|
||||
});
|
||||
*/
|
||||
|
||||
it("should NOT list string literals from other files", function () {
|
||||
testEditor.setCursorPos({ line: 6, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
@@ -652,18 +652,6 @@ define(function (require, exports, module) {
|
||||
hintsPresent(hintObj, ["B1", "paramB1"]);
|
||||
});
|
||||
|
||||
/* Single quote and double quote keys cause hasHints() to return false.
|
||||
It used to return true when string literals were supported.
|
||||
it("should list implicit hints when typing string literals (single quote)", function () {
|
||||
testEditor.setCursorPos({ line: 9, ch: 0 });
|
||||
expectHints(JSCodeHints.jsHintProvider, "'");
|
||||
});
|
||||
|
||||
it("should list implicit hints when typing string literals (double quote)", function () {
|
||||
testEditor.setCursorPos({ line: 9, ch: 0 });
|
||||
expectHints(JSCodeHints.jsHintProvider, "\"");
|
||||
});
|
||||
*/
|
||||
it("should give priority to identifier names associated with the current context", function () {
|
||||
testEditor.setCursorPos({ line: 16, ch: 0 });
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
@@ -680,7 +668,7 @@ define(function (require, exports, module) {
|
||||
hintsPresentOrdered(hintObj, ["funB", "funE"]);
|
||||
});
|
||||
|
||||
/* it("should choose the correct delimiter for string literal hints with no query", function () {
|
||||
xit("should choose the correct delimiter for string literal hints with no query", function () {
|
||||
var start = { line: 18, ch: 0 },
|
||||
end = { line: 18, ch: 18 };
|
||||
|
||||
@@ -692,7 +680,7 @@ define(function (require, exports, module) {
|
||||
expect(testDoc.getRange(start, end)).toEqual('"hello\\\\\\" world!"');
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
it("should insert value hints with no current query", function () {
|
||||
var start = { line: 6, ch: 0 },
|
||||
end = { line: 6, ch: 2 };
|
||||
@@ -954,7 +942,7 @@ define(function (require, exports, module) {
|
||||
|
||||
});
|
||||
|
||||
// parameter type anotation tests, due to another bug #3670: first argument has ?
|
||||
// parameter type anotation tests, due to another bug #3670: first argument has ?
|
||||
xit("should list parameter Date,boolean type", function () {
|
||||
var start = { line: 109, ch: 0 },
|
||||
testPos = { line: 109, ch: 11 };
|
||||
@@ -967,7 +955,7 @@ define(function (require, exports, module) {
|
||||
});
|
||||
});
|
||||
|
||||
// parameter type anotation tests, due to another bug #3670: first argument has ?
|
||||
// parameter type anotation tests, due to another bug #3670: first argument has ?
|
||||
xit("should list parameter function type and best guess for its argument/return types", function () {
|
||||
var testPos = { line: 123, ch: 11 };
|
||||
|
||||
@@ -1073,6 +1061,7 @@ define(function (require, exports, module) {
|
||||
editorJumped({line: 3, ch: 6});
|
||||
});
|
||||
});
|
||||
|
||||
it("should jump to closure, early defined var", function () {
|
||||
var start = { line: 17, ch: 9 };
|
||||
|
||||
@@ -1209,8 +1198,7 @@ define(function (require, exports, module) {
|
||||
});
|
||||
});
|
||||
|
||||
// Tern issue #208. Fixed in the latest tern
|
||||
xit("should list parameter hint for optional parameters", function () {
|
||||
it("should list parameter hint for optional parameters", function () {
|
||||
var testPos = { line: 214, ch: 17 };
|
||||
|
||||
testEditor.setCursorPos(testPos);
|
||||
@@ -1238,8 +1226,7 @@ define(function (require, exports, module) {
|
||||
});
|
||||
});
|
||||
|
||||
// Tern is not returning the correct function type info for the array annotation
|
||||
xit("should list parameter hint for a source array annotation", function () {
|
||||
it("should list parameter hint for a source array annotation", function () {
|
||||
var testPos = { line: 200, ch: 20 };
|
||||
testEditor.setCursorPos(testPos);
|
||||
runs(function () {
|
||||
@@ -1453,7 +1440,9 @@ define(function (require, exports, module) {
|
||||
hintsPresentExact(hintObj, ["addMessage", "name", "privilegedMethod", "publicMethod1"]);
|
||||
});
|
||||
});
|
||||
it("should read methods created in submodule", function () {
|
||||
|
||||
// bug: wait for tern
|
||||
xit("should read methods created in submodule", function () {
|
||||
var start = { line: 19, ch: 15 };
|
||||
|
||||
runs(function () {
|
||||
@@ -1474,7 +1463,8 @@ define(function (require, exports, module) {
|
||||
hintsPresentExact(hintObj, ["addMessage", "name", "privilegedMethod", "publicMethod1"]);
|
||||
});
|
||||
});
|
||||
// bug: wait for tern
|
||||
|
||||
// bug: wait for tern
|
||||
xit("should read methods created in submodule module", function () {
|
||||
var start = { line: 62, ch: 0 },
|
||||
testPos = { line: 62, ch: 13};
|
||||
@@ -1506,6 +1496,7 @@ define(function (require, exports, module) {
|
||||
hintsPresentExact(hintObj, ["color", "material", "size"]);
|
||||
});
|
||||
});
|
||||
|
||||
// tern bug: https://github.com/marijnh/tern/issues/147
|
||||
xit("should read properties from exported module", function () {
|
||||
var start = { line: 96, ch: 0 },
|
||||
@@ -1519,7 +1510,7 @@ define(function (require, exports, module) {
|
||||
});
|
||||
});
|
||||
|
||||
// bug in test framework? can't run sequencial jump, verification is wrong
|
||||
// bug in test framework? can't run sequential jump, verification is wrong
|
||||
xit("should jump to a module, depending module", function () {
|
||||
var start = { line: 93, ch: 25 },
|
||||
testPos = { line: 8, ch: 35 };
|
||||
@@ -1653,9 +1644,7 @@ define(function (require, exports, module) {
|
||||
|
||||
describe("regression tests", function () {
|
||||
|
||||
// Test maybe valid javascript identifier
|
||||
// FIXME (issue #3558)
|
||||
xit("should return true for valid identifier, false for invalid one", function () {
|
||||
it("should return true for valid identifier, false for invalid one", function () {
|
||||
var identifierList = ["ᾩ", "ĦĔĽĻŎ", "〱〱〱〱", "जावास्क्रि",
|
||||
"KingGeorgeⅦ", "π", "ಠ_ಠ",
|
||||
"price_9̶9̶_89", "$_3423", "TRUE", "FALSE", "IV"];
|
||||
@@ -1738,7 +1727,6 @@ define(function (require, exports, module) {
|
||||
tearDownTest();
|
||||
});
|
||||
|
||||
// Test maybe valid javascript identifier
|
||||
// FIXME (issue #3558)
|
||||
xit("should return true for valid identifier, false for invalid one", function () {
|
||||
var identifierList = ["ᾩ", "ĦĔĽĻŎ", "〱〱〱〱", "जावास्क्रि",
|
||||
@@ -1769,6 +1757,7 @@ define(function (require, exports, module) {
|
||||
tearDownTest();
|
||||
|
||||
});
|
||||
|
||||
// FIXME (issue #3915)
|
||||
xit("should read function name has double byte chars", function () {
|
||||
var start = { line: 15, ch: 8 },
|
||||
@@ -1794,6 +1783,7 @@ define(function (require, exports, module) {
|
||||
editorJumped({line: 12, ch: 20});
|
||||
});
|
||||
});
|
||||
|
||||
// FIXME (issue #3915)
|
||||
xit("should read function name has non ascii chars", function () {
|
||||
var start = { line: 16, ch: 16 };
|
||||
|
||||
Reference in new issue
Block a user