Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 658 Bytes

TEST.md

File metadata and controls

19 lines (12 loc) · 658 Bytes

Test your module

+ Publish your package to npm:
    For private packages and unscoped packages, use npm publish.
    For scoped public packages, use npm publish --access public
+ On the command line, create a new test directory outside of your project directory.

mkdir test-directory
  • Switch to the new directory:

    cd /path/to/test-directory

  • In the test directory, install your module:

    npm install

  • In the test directory, create a test.js file which requires your module and calls your module as a method.

  • On the command line, run node test.js. The message sent to the console.log should appear.