Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis tests failing in Node 4 and 10 #205

Closed
jywarren opened this issue Jan 4, 2019 · 9 comments
Closed

Travis tests failing in Node 4 and 10 #205

jywarren opened this issue Jan 4, 2019 · 9 comments

Comments

@jywarren
Copy link
Member

jywarren commented Jan 4, 2019

Strangely, we're seeing some Travis test failures:

https://travis-ci.org/publiclab/PublicLab.Editor/builds/475475435

After changes from: #198

Node 4 errors are same as #111

Node 10 errors are new;

Fatal error: Callback must be a function�
The command "grunt jasmine" exited with 3.

What's odd is that we aren't supposed to be running tests in either:

- '5'
- '6'
- '7'

Not sure what's going on here!

@rexagod
Copy link
Member

rexagod commented Jan 4, 2019

@jywarren I'm currently attending to #168, installing peer dependencies ( * 2018-05-19   v2.0.0   Switch from PhantomJS to Chrome Headless via Puppeteer), trying alternatives (Chutzpah, guard-jasmine, phantom-jasmine) that still use phantom, but no luck so far. I did encounter an fs decaprecation error that requires async functions to have a callback and saw something like this issue too.

Also, #196 needs to be resolved as soon as #168 does.

@rexagod
Copy link
Member

rexagod commented Jan 5, 2019

@rexagod
Copy link
Member

rexagod commented Jan 5, 2019

unlinkSync, unlike unlink, doesn't require callbacks (inside node_modules/tasks/jasmine.js)

Now using node v10.15.0 (npm v6.4.1)
Running "jasmine:publiclabeditor" (jasmine) task
Testing jasmine specs via PhantomJS

 Editor
   ✓ exists, and has a textarea
   ✓ counts valid modules and enables publish button
   ✓ sends AJAX request on editor.publish()
 Errors
   ✓ displays given errors
   ✓ does not display error alert if there are no errors
 Formatter
   ✓ converts basic post data into a given format
 History
   ✓ has log, key, interval, and id
   ✓ can be flushed
   ✓ adds, fetches, and stores
   ✓ creates new log entry when value() set
   ✓ stores only 20 items until we optimize it
   ✓ writes out history to a DOM element
 MainImageModule
   ✓ reports key, value, valid
   ✓ makes upload request
 Prepopulated editor
   ✓ loads existing title, body, & tags
   ✓ accepts prepopulated values via constructor options, by key
 RichTextModule
   ✓ reports key, value, valid
   ✓ sets and reports value regardless of whether it's in markdown or wysiwyg mode
   ✓ recognizes @callouts and #hashtags and #hash-tags
   ✓ accepts customized authors method as constructor option for @callouts
   ✓ detects data-urls
 TagsModule
   ✓ reports key, value, valid
   ✓ adds value to 'tags' key of editor.data, instead of overwriting it
 Wysiwyg
   ✓ converts markdown to html and back
   ✓ parses @usernames and #tagnames and #tag-names
   * runs post-conversion filter

26 specs in 0.937s.
>> 0 failures

Done.
Now using node v4.9.1 (npm v2.15.11)
Running "jasmine:publiclabeditor" (jasmine) task
Testing jasmine specs via PhantomJS

 Editor
   ✓ exists, and has a textarea
   ✓ counts valid modules and enables publish button
   ✓ sends AJAX request on editor.publish()
 Errors
   ✓ displays given errors
   ✓ does not display error alert if there are no errors
 Formatter
   ✓ converts basic post data into a given format
 History
   ✓ has log, key, interval, and id
   ✓ can be flushed
   ✓ adds, fetches, and stores
   ✓ creates new log entry when value() set
   ✓ stores only 20 items until we optimize it
   ✓ writes out history to a DOM element
 MainImageModule
   ✓ reports key, value, valid
   ✓ makes upload request
 Prepopulated editor
   ✓ loads existing title, body, & tags
   ✓ accepts prepopulated values via constructor options, by key
 RichTextModule
   ✓ reports key, value, valid
   ✓ sets and reports value regardless of whether it's in markdown or wysiwyg mode
   ✓ recognizes @callouts and #hashtags and #hash-tags
   ✓ accepts customized authors method as constructor option for @callouts
   ✓ detects data-urls
 TagsModule
   ✓ reports key, value, valid
   ✓ adds value to 'tags' key of editor.data, instead of overwriting it
 Wysiwyg
   ✓ converts markdown to html and back
   ✓ parses @usernames and #tagnames and #tag-names
   * runs post-conversion filter

26 specs in 0.971s.
>> 0 failures

Done.

@rexagod
Copy link
Member

rexagod commented Jan 5, 2019

Building on travis now

@rexagod
Copy link
Member

rexagod commented Jan 5, 2019

language: node_js
node_js:
  - '4'
  - '5'
  - '6'
  - '7'
  - '8'
  - '9'
  - '10'
before_install:
  - npm install
  - curl https://gist.githubusercontent.com/rexagod/aca6a4f11af0148194f6140a3c81ba1a/raw/a958bd8d839429c11a7e6c657260f030d79b9849/jasmine.js > /home/travis/build/publiclab/PublicLab.Editor/node_modules/grunt-contrib-jasmine/tasks/jasmine.js
  - npm install -g grunt-cli
  - grunt build
script: grunt jasmine

@jywarren wrote and tried this on my system and it works fine (although I used relative path ./node_modules/grunt-contrib-jasmine/tasks/jasmine.js for curl) but failed on travis. I guess something's not right. 🤔

@rexagod
Copy link
Member

rexagod commented Jan 5, 2019

I ran this on node 11 and even that passed!

Now using node v11.6.0 (npm v6.5.0-next.0)
Running "jasmine:publiclabeditor" (jasmine) task
Testing jasmine specs via PhantomJS

 Editor
   ✓ exists, and has a textarea
   ✓ counts valid modules and enables publish button
   ✓ sends AJAX request on editor.publish()
 Errors
   ✓ displays given errors
   ✓ does not display error alert if there are no errors
 Formatter
   ✓ converts basic post data into a given format
 History
   ✓ has log, key, interval, and id
   ✓ can be flushed
   ✓ adds, fetches, and stores
   ✓ creates new log entry when value() set
   ✓ stores only 20 items until we optimize it
   ✓ writes out history to a DOM element
 MainImageModule
   ✓ reports key, value, valid
   ✓ makes upload request
 Prepopulated editor
   ✓ loads existing title, body, & tags
   ✓ accepts prepopulated values via constructor options, by key
 RichTextModule
   ✓ reports key, value, valid
   ✓ sets and reports value regardless of whether it's in markdown or wysiwyg mode
   ✓ recognizes @callouts and #hashtags and #hash-tags
   ✓ accepts customized authors method as constructor option for @callouts
   ✓ detects data-urls
 TagsModule
   ✓ reports key, value, valid
   ✓ adds value to 'tags' key of editor.data, instead of overwriting it
 Wysiwyg
   ✓ converts markdown to html and back
   ✓ parses @usernames and #tagnames and #tag-names
   * runs post-conversion filter

26 specs in 1.15s.
>> 0 failures

Done.

@rexagod
Copy link
Member

rexagod commented Jan 5, 2019

Tried bumping #168 contrib-jasmine to 1.1.0 and applied the above fix, build passed. Maybe I should check the changelogs after that release, because upon testing this on v2.0.0 (Phantom removed Chrome headless added) to v2.0.3, the errors are the same.

@rexagod
Copy link
Member

rexagod commented Jan 6, 2019

Reverted everything and tried testing in node 10 on a previous commit but that showed the same error too.

HEAD is now at 7da18f6 PL.Editor #182 Data-urls detect-and-instruct (#200)
Running "jasmine:publiclabeditor" (jasmine) task
Testing jasmine specs via PhantomJS

 Editor
   ✓ exists, and has a textarea
   ✓ counts valid modules and enables publish button
   ✓ sends AJAX request on editor.publish()
 Errors
   ✓ displays given errors
   ✓ does not display error alert if there are no errors
 Formatter
   ✓ converts basic post data into a given format
 History
   ✓ has log, key, interval, and id
   ✓ can be flushed
   ✓ adds, fetches, and stores
   ✓ creates new log entry when value() set
   ✓ stores only 20 items until we optimize it
   ✓ writes out history to a DOM element
 MainImageModule
   ✓ reports key, value, valid
   ✓ makes upload request
 Prepopulated editor
   ✓ loads existing title, body, & tags
   ✓ accepts prepopulated values via constructor options, by key
 RichTextModule
   ✓ reports key, value, valid
   ✓ sets and reports value regardless of whether it's in markdown or wysiwyg mode
   ✓ recognizes @callouts and #hashtags and #hash-tags
   ✓ accepts customized authors method as constructor option for @callouts
   ✓ detects data-urls
 TagsModule
   ✓ reports key, value, valid
   ✓ adds value to 'tags' key of editor.data, instead of overwriting it
 Wysiwyg
   ✓ converts markdown to html and back
   ✓ parses @usernames and #tagnames and #tag-names
   * runs post-conversion filter

26 specs in 1.034s.
>> 0 failures
Fatal error: Callback must be a function

@jywarren
Copy link
Member Author

jywarren commented Jan 8, 2019 via email

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

No branches or pull requests

3 participants