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

test: add coverage for vm: Module and SyntheticModule #31028

Closed

Conversation

andrewkuzmenko
Copy link

code and learn task for additional coverage for situation when
creating an abstract instance of the Module and SyntheticModule throws exception if invalid params in constructor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 19, 2019
test/parallel/test-vm-module-basic.js Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

Andrew Kuzmenko added 2 commits December 20, 2019 12:28
Test the impossibility of creating
an abstract instance of the Module.
Test of SyntheticModule to throw exception
if invalid params in constructor
Fix 'max-len','no-restricted-syntax'
(assert.throws must be envoken with at least two args)
and useless blank lines at the end of file
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@BridgeAR
Copy link
Member

Still LGTM

@andrewkuzmenko thanks for rebasing so quickly after the conflict! Just as a note: we mostly care about the error code and roughly check that the error message is indeed about the correct property. I personally suggest to use assert.throws() in the future instead of common.expectsError(). It was originally used at times when assert was not as powerful and as callback variation. The only real difference is the magically type property that common.expectsError supports.

@Trott
Copy link
Member

Trott commented Dec 22, 2019

Landed in ee14a64.

Thanks for the contribution! 🎉

@Trott Trott closed this Dec 22, 2019
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 22, 2019
Test the impossibility of creating
an abstract instance of the Module.
Test of SyntheticModule to throw exception
if invalid params in constructor

PR-URL: nodejs#31028
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BridgeAR pushed a commit that referenced this pull request Jan 3, 2020
Test the impossibility of creating
an abstract instance of the Module.
Test of SyntheticModule to throw exception
if invalid params in constructor

PR-URL: #31028
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Jan 7, 2020
targos pushed a commit that referenced this pull request Jan 14, 2020
Test the impossibility of creating
an abstract instance of the Module.
Test of SyntheticModule to throw exception
if invalid params in constructor

PR-URL: #31028
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
Test the impossibility of creating
an abstract instance of the Module.
Test of SyntheticModule to throw exception
if invalid params in constructor

PR-URL: #31028
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants