Created
March 17, 2014 17:50
-
-
Save ingorichter/9604564 to your computer and use it in GitHub Desktop.
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
it("should show only warnings for the current file", function () { | |
CodeInspection.toggleEnabled(false); | |
var deferred = new $.Deferred(); | |
var asyncProvider = { | |
name: "Test Async Linter", | |
scanFileAsync: function () { | |
return deferred.promise(); | |
} | |
}; | |
CodeInspection.register("javascript", asyncProvider); | |
waitsForDone(SpecRunnerUtils.openProjectFiles(["no-errors.js", "errors.js"], "open test files")); | |
runs(function () { | |
CodeInspection.toggleEnabled(true); | |
}); | |
// Close the file which was started to lint | |
runs(function () { | |
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE), "timeout on FILE_CLOSE", 1000); | |
// let the linter finish | |
deferred.resolve(failLintResult()); | |
expect($("#problems-panel").is(":visible")).toBe(false); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment