Last active
August 29, 2015 13:57
-
-
Save taichi/9803501 to your computer and use it in GitHub Desktop.
Brackets Extension template.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see. | |
// http://jasmine.github.io/1.3/introduction.html | |
// https://github.com/adobe/brackets/wiki/How-to-Write-Extensions | |
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ | |
/*global define, $, brackets, describe, it, expect, beforeFirst, afterLast, beforeEach, afterEach, runs, waitsFor, waitsForDone, waitsForFail */ | |
/*unittests: MyExtension */ // for Test Runner of https://github.com/dangoor/TestQuickly | |
define(function(require, exports, module) { | |
"use strict"; | |
var SpecRunnerUtils = brackets.getModule("spec/SpecRunnerUtils"), | |
FileUtils = brackets.getModule("file/FileUtils"); | |
describe("MyExtension", function() { | |
var extensionPath = FileUtils.getNativeModuleDirectoryPath(module), | |
fixtures = extensionPath + "/fixtures"; | |
var target, PM, DM; | |
beforeFirst(function() { | |
SpecRunnerUtils.createTestWindowAndRun(this, function(w) { | |
// see. src/brackets.js#_initTest | |
// https://github.com/adobe/brackets/blob/master/src/brackets.js#L147 | |
var t = w.brackets.test; | |
PM = t.ProjectManager; | |
DM = t.DocumentManager; | |
var req = t.ExtensionLoader.getRequireContextForExtension("MyExtension"); | |
target = req("main"); | |
}); | |
}); | |
afterLast(function() { | |
SpecRunnerUtils.closeTestWindow(); | |
}); | |
describe("main_first", function() { | |
beforeEach(function() { | |
SpecRunnerUtils.loadProjectInTestWindow(fixtures); | |
}); | |
}); | |
describe("main_second", function() {}); | |
describe("main_third", function() {}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment