mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Merge branch 'glenn/file-system' of https://github.com/adobe/brackets into glenn/file-system
This commit is contained in:
commit
5d8394d253
10 files changed
+117
-88
No files matched your search
@@ -1444,6 +1444,12 @@ define(function (require, exports, module) {
|
||||
function handleProjectOpen(projectRootPath) {
|
||||
initPreferences(projectRootPath);
|
||||
}
|
||||
|
||||
|
||||
/** Used to avoid timing bugs in unit tests */
|
||||
function _readyPromise() {
|
||||
return deferredPreferences;
|
||||
}
|
||||
|
||||
exports.getBuiltins = getBuiltins;
|
||||
exports.getResolvedPath = getResolvedPath;
|
||||
@@ -1456,5 +1462,6 @@ define(function (require, exports, module) {
|
||||
exports.requestParameterHint = requestParameterHint;
|
||||
exports.handleProjectClose = handleProjectClose;
|
||||
exports.handleProjectOpen = handleProjectOpen;
|
||||
exports._readyPromise = _readyPromise;
|
||||
|
||||
});
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, indent: 4, maxerr: 50, regexp: true */
|
||||
/*global define, describe, xdescribe, it, xit, expect, beforeEach, afterEach, waitsFor, runs, $, brackets, waitsForDone, spyOn */
|
||||
/*global define, describe, it, xit, expect, beforeEach, afterEach, waitsFor, runs, $, brackets, waits, waitsForDone, spyOn */
|
||||
|
||||
define(function (require, exports, module) {
|
||||
"use strict";
|
||||
@@ -424,7 +424,7 @@ define(function (require, exports, module) {
|
||||
}
|
||||
}
|
||||
|
||||
function setupTest(path, primePump) {
|
||||
function setupTest(path, primePump) { // FIXME: primePump argument ignored even though used below
|
||||
DocumentManager.getDocumentForPath(path).done(function (doc) {
|
||||
testDoc = doc;
|
||||
});
|
||||
@@ -437,6 +437,8 @@ define(function (require, exports, module) {
|
||||
runs(function () {
|
||||
testEditor = createMockEditor(testDoc);
|
||||
preTestText = testDoc.getText();
|
||||
|
||||
waitsForDone(ScopeManager._readyPromise());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -740,11 +742,13 @@ define(function (require, exports, module) {
|
||||
middle = { line: 6, ch: 3 },
|
||||
end = { line: 6, ch: 8 },
|
||||
endplus = { line: 6, ch: 12 };
|
||||
|
||||
testDoc.replaceRange("A1.prop", start, start);
|
||||
testEditor.setCursorPos(middle);
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
selectHint(JSCodeHints.jsHintProvider, hintObj, "propA");
|
||||
|
||||
runs(function () {
|
||||
testDoc.replaceRange("A1.prop", start, start);
|
||||
testEditor.setCursorPos(middle);
|
||||
var hintObj = expectHints(JSCodeHints.jsHintProvider);
|
||||
selectHint(JSCodeHints.jsHintProvider, hintObj, "propA");
|
||||
});
|
||||
|
||||
runs(function () {
|
||||
expect(testEditor.getCursorPos()).toEqual(end);
|
||||
@@ -1407,9 +1411,7 @@ define(function (require, exports, module) {
|
||||
|
||||
});
|
||||
|
||||
// TODO: FileSystem - there is something wrong with the tern paths,
|
||||
// causing an infinite recursion in directory scanning.
|
||||
xdescribe("JavaScript Code Hinting without modules", function () {
|
||||
describe("JavaScript Code Hinting without modules", function () {
|
||||
var testPath = extensionPath + "/unittest-files/non-module-test-files/app.js";
|
||||
ScopeManager.handleProjectOpen(extensionPath + "/unittest-files/non-module-test-files/");
|
||||
|
||||
@@ -1433,9 +1435,7 @@ define(function (require, exports, module) {
|
||||
});
|
||||
});
|
||||
|
||||
// TODO: FileSystem - there is something wrong with the tern paths,
|
||||
// causing an infinite recursion in directory scanning.
|
||||
xdescribe("JavaScript Code Hinting with modules", function () {
|
||||
describe("JavaScript Code Hinting with modules", function () {
|
||||
var testPath = extensionPath + "/unittest-files/module-test-files/module_tests.js";
|
||||
|
||||
beforeEach(function () {
|
||||
|
||||
Reference in new issue
Block a user