Testing Packages with Tinytest

Meteor now allows you to test packages with the test-packages command

Good job! That's it for "Testing Packages with Tinytest."

Need a second look? Watch again

Testing Packages with Tinytest

Meteor now allows you to test packages with the test-packages command. In this episode we'll explore Tinytest, the early testing framework that ships with Meteor.

  • Meteor
  • Tutorial
<p class="code-block-title">package.js</p> ```javascript Package.on_test(function (api) { api.use(['meteor-file', 'tinytest', 'test-helpers'], ['client', 'server']); api.add_files('meteor-file-test.js', ['client', 'server']); }); ``` <p class="code-block-title">meteor-file-test.js</p> ```javascript Tinytest.add('MeteorFile - read', function (test) { test.equal(1, 1, 'Expected values to be equal); }); ``` <p class="code-block-title">command line</p> ```bash > cd packages/meteor-file > meteor test-packages ./ ```
Join the Discussion

Want to leave a comment? .