mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Cleaner fix for race condition bugs in JS code hints unit tests.
This commit is contained in:
1 parent
af57cff028
commit
087a4519a5
2 files changed
+8
-7
No files matched your search
@@ -424,7 +424,6 @@ define(function (require, exports, module) {
|
||||
}
|
||||
}
|
||||
|
||||
var firstTest = true;
|
||||
function setupTest(path, primePump) { // FIXME: primePump argument ignored even though used below
|
||||
DocumentManager.getDocumentForPath(path).done(function (doc) {
|
||||
testDoc = doc;
|
||||
@@ -439,10 +438,7 @@ define(function (require, exports, module) {
|
||||
testEditor = createMockEditor(testDoc);
|
||||
preTestText = testDoc.getText();
|
||||
|
||||
if (firstTest) {
|
||||
waits(1000); // give time to load preferences file; code hints NPE otherwise
|
||||
firstTest = false;
|
||||
}
|
||||
waitsForDone(ScopeManager._readyPromise());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -747,8 +743,6 @@ define(function (require, exports, module) {
|
||||
end = { line: 6, ch: 8 },
|
||||
endplus = { line: 6, ch: 12 };
|
||||
|
||||
waits(1000); // TODO filesystem: why does this test need a delay to pass most of the time?
|
||||
|
||||
runs(function () {
|
||||
testDoc.replaceRange("A1.prop", start, start);
|
||||
testEditor.setCursorPos(middle);
|
||||
|
||||
Reference in new issue
Block a user