Atom Core spec broken?


#1

Anyone else seeing two failed assertions?

EditorComponent
  hiding and showing the editor
    when stylesheets change while the editor is hidden
      it does not re-measure character widths until the editor is shown again
        TypeError: undefined is not a function
          at [object Object].<anonymous> (/Users/thomasjo/Projects/atom/spec/editor-component-spec.coffee:38:19)
          at _fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:787:54)
          at self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:816:30)
          at Promise.promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:749:13)
          at /Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:557:44
          at flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:108:17)
          at process._tickCallback (node.js:349:11)
        Error: No animation frame requested
          at noAnimationFrame (/Users/thomasjo/Projects/atom/spec/editor-component-spec.coffee:22:39)
          at [object Object].<anonymous> (/Users/thomasjo/Projects/atom/spec/editor-component-spec.coffee:1990:9)

Seems related to some changes committed about 8 hours ago, but wanted to check if it’s just a local issue or not.

HEAD is currently pointing to 412793697f0b21b9cec304923486fb8757b44db3.


#2

Pinging @nathansobo; seems related to your commits.


Out of curiosity, am I supposed to run the specs via apm test or script/test. The latter keeps failing because grunt-cli gets nuked, and the script then fails with

/bin/sh: node_modules/.bin/grunt: No such file or directory

#3

From this PR I made some time ago:

Since then, whenever I have to run Atom tests i run them from Atom directly.


#4

That’s the same as running apm test, but I’m wondering if I can/should use script/test instead. For now I’ll stick to apm :sunny:


#5

I’m curious to know if apm test run all the tests (cmd-alt-ctrl-s) or only the core specs (cmd-alt-ctrl-p), do you know about it?


#6

As I alluded to in my previous reply, it’s the same as running the package specs (ctrl-alt-cmd-p); apm test runs all specs located in ./spec/. I’m just so used to running test suites from a terminal. Otherwise I’d likely run them from within Atom as well, like you are. I’m an old :dog:


#7

I’m able to run those specs successfully on master. Have you tried running apm update to be sure you have the latest dependencies?


#8

Yeah tried that. As well as script/clean followed by script/build numerous times. What’s odd is that the only spec that is executed is the one that fails; the rest are skipped

Finished in 0.884 seconds
1 test, 2 assertions, 2 failures, 1232 skipped

From a clean clone, on master branch I just did

$ script/build
$ apm test

And got exactly the same result.

Any suggestions? The build succeeds and Atom is working as expected (as best as I can tell from using it all day today).


$ node -v 
v0.10.29

$ npm -v
1.4.21

$ git rev-parse HEAD
800d65e3dec6592759be6899782e920d1e564019

#9

Now I’m getting failures on master. Weird. Sorry about this. I’ll resolve the problems I’m having and report back.


#10

I think it’s because the window isn’t focused. I’ve created an issue to track the problem. For now you should run the specs from within Atom as a workaround, or just ignore these two failures. Sorry for the trouble.


#11

Thanks for investigating!


#12

I’m still seeing the exact same issue when running from within Atom; 1232 skipped and 1 failing.


#13

Wow. Comedy of errors here. I left a test focused in the core specs. That should be fixed now.