From 41e3f21ab2f855f69195fc7a0f9c287833789169 Mon Sep 17 00:00:00 2001 From: Harald Nordgren Date: Mon, 1 Oct 2018 01:02:24 +0200 Subject: [PATCH] Clean up unit tests that wait for a promise --- test/spec/JSUtils-test.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/spec/JSUtils-test.js b/test/spec/JSUtils-test.js index b09f3eaf864..c76523bfe89 100644 --- a/test/spec/JSUtils-test.js +++ b/test/spec/JSUtils-test.js @@ -118,10 +118,8 @@ define(function (require, exports, module) { it("should return correct start and end line numbers for es6 class definitions and methods", function () { runs(function () { - doneLoading = false; - init(this, es6ClassesFileEntry); + waitsForDone(init(this, es6ClassesFileEntry)); }); - waitsFor(function () { return doneLoading; }, 1000); runs(function () { expectFunctionRanges(this, this.fileJsContent, "Shape", [ {start: 0, end: 9} ]);