Skip to content

Instantly share code, notes, and snippets.

@barahilia
Created September 9, 2014 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barahilia/62871d9219cee825d82e to your computer and use it in GitHub Desktop.
Save barahilia/62871d9219cee825d82e to your computer and use it in GitHub Desktop.
Workaround for R# complaining on use of an implicitly declared global variable
// This is a workaround for R# complaining on undefined global variables.
// In practice they come from and are defined by Jasmine and Protractor
// frameworks, so are not a real issues.
// Jasmine
var describe = function () { };
var beforeEach = function () { };
var afterEach = function () { };
var it = function () { };
var expect = function () { };
var spyOn = function () { };
// Protractor
var protractor = function () { };
var by = function () { };
var browser = function () { };
@NathanielPreiss
Copy link

Came across this solution and it worked for me. However by declaring them as functions it overlayed the existing global methods so I just did an inline declaration of all the method names without assigning them and it fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment