Skip to content

Latest commit

 

History

History
 
 

Unit tests for AWS SDK for JavaScript (version 3)

Run the unit tests using Jest.

  1. Clone the AWS Code Samples repo to your local environment. See the Github documentation for instructions.

  2. Navigate to the javascript3/example_code folder.

cd javascriptv3/example_code
  1. Install Jest using npm.
npm install --save-dev jest

NOTE: For more information on installing Jest, see Jest - Getting Started.

  1. Navigate to the directory containing the files you want to test. For example:
cd tests/s3
  1. Change the extension of the files you're testing from .ts to .js.

  2. Add module.exports ={*} to the bottom of each file your testing.

  3. Run tests.

npm run test