Skip to content

Commit

Permalink
fix: mac jsutils integ tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Oct 14, 2023
1 parent 5961dde commit 0730f7a
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions test/spec/JSUtils-integ-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ define(function (require, exports, module) {
var functions; // populated by indexAndFind()

beforeAll(async function () {
await SpecRunnerUtils.createTestWindowAndRun({forceReload: true});
}, 30000);

beforeEach(async function () {
let testWindow = await SpecRunnerUtils.createTestWindowAndRun();
var brackets = testWindow.brackets;
let testWindow = await SpecRunnerUtils.createTestWindowAndRun({forceReload: true});
let brackets = testWindow.brackets;
DocumentManager = brackets.test.DocumentManager;
FileViewController = brackets.test.FileViewController;
ProjectManager = brackets.test.ProjectManager;
Expand All @@ -52,14 +48,6 @@ define(function (require, exports, module) {
await SpecRunnerUtils.loadProjectInTestWindow(testPath);
}, 30000);

afterEach(async function () {
DocumentManager = null;
FileViewController = null;
JSUtils = null;
ProjectManager = null;
await SpecRunnerUtils.closeTestWindow();
}, 30000);

async function init(fileName) {
await awaitsForDone(
FileViewController.openAndSelectDocument(
Expand Down Expand Up @@ -115,6 +103,25 @@ define(function (require, exports, module) {

describe("Working with unsaved changes", function () {

beforeEach(async function () {
let testWindow = await SpecRunnerUtils.createTestWindowAndRun({forceReload: true});
let brackets = testWindow.brackets;
DocumentManager = brackets.test.DocumentManager;
FileViewController = brackets.test.FileViewController;
ProjectManager = brackets.test.ProjectManager;
JSUtils = brackets.test.JSUtils;

await SpecRunnerUtils.loadProjectInTestWindow(testPath);
}, 30000);

afterEach(async function () {
DocumentManager = null;
FileViewController = null;
JSUtils = null;
ProjectManager = null;
await SpecRunnerUtils.closeTestWindow();
}, 30000);

async function fileChangedTest(buildCache) {
await init("edit.js");

Expand Down

0 comments on commit 0730f7a

Please sign in to comment.