Skip to content

Replace all instances of console.assert() with assert() from 'assert' standard lib.#235

Merged
usergenic merged 1 commit intomasterfrom
assert-not-console-assert
Apr 27, 2018
Merged

Replace all instances of console.assert() with assert() from 'assert' standard lib.#235
usergenic merged 1 commit intomasterfrom
assert-not-console-assert

Conversation

@usergenic
Copy link
Contributor

As of node 10, console.assert() doesn't throw an AssertionError anymore. However const assert = require('assert'); assert(); does. So I switched over to assert() wherever console.assert() was in use.

@usergenic usergenic requested a review from rictic April 25, 2018 19:29
@rictic
Copy link
Contributor

rictic commented Apr 25, 2018

Looks like appveyor is running with node 10 and no longer failing where it was before. Now we've just got a minor whitespace difference in the polymer build integration test goldens. Mind fixing that too in this PR?

@rictic
Copy link
Contributor

rictic commented Apr 25, 2018

Hm, weirdly though, node 6 passes on travis without whitespace changes…

@usergenic
Copy link
Contributor Author

Side note: I believe Node 10 has issues (even locally) in polymer-build tests with some dependency of the temp library we use to make directories for test scenarios:

     Uncaught RangeError [ERR_OUT_OF_RANGE]: The value of "mode" is out of range. Received 16877
      at Object.fs.fchmod (fs.js:1024:11)
      at Object.fchmod (node_modules/graceful-fs/polyfills.js:237:17)
      at mode (node_modules/vinyl-fs/lib/fileOperations.js:132:10)
      at onStat (node_modules/vinyl-fs/lib/fileOperations.js:125:14)
      at node_modules/graceful-fs/polyfills.js:287:18
      at FSReqWrap.oncomplete (fs.js:150:5)

I get this locally and on travis for node 10:
screen shot 2018-04-25 at 12 40 24 pm

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants