Atom.project.path (cannot call path of undefined in test)


#1

In a class of mine I reference atom.project.path. When I run my package tests I get the error ‘cannot call path of undefined’ and it points to that line.

Any ideas on why this is failing? Why isn’t atom.project available in my test?


#2

Because the tests do not set everything up for performance reasons. Check out the whitespace package for examples of how to write Atom specs. Specifically:

https://github.com/atom/whitespace/blob/master/spec/whitespace-spec.coffee