Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:08:40+00:00 2026-06-13T03:08:40+00:00

I don’t see how to do test driven development in meteor. I don’t see

  • 0

I don’t see how to do test driven development in meteor.

I don’t see it mentioned anywhere in documentation or FAQ. I don’t see any examples or anything like that.

I see that some packages are using Tinytest.

I would need response from developers, what is roadmap regarding this. Something along the lines of:

  • possible, no documentation, figure it out yourself
  • meteor is not built in a way that you can make testable apps
  • this is planned feature
  • etc
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:08:42+00:00Added an answer on June 13, 2026 at 3:08 am

    Update 3: As of Meteor 1.3, meteor includes a testing guide with step-by-step instructions for unit, integration, acceptance, and load testing.

    Update 2: As of November 9th, 2015, Velocity is no longer maintained. Xolv.io is focusing their efforts on Chimp, and the Meteor Development Group must choose an official testing framework.

    Update: Velocity is Meteor’s official testing solution as of 0.8.1.


    Not much has been written about automated testing with Meteor at this time. I expect the Meteor community to evolve testing best-practices before establishing anything in the official documentation. After all, Meteor reached 0.5 this week, and things are still changing rapidly.

    The good news: you can use Node.js testing tools with Meteor.

    For my Meteor project, I run my unit tests with Mocha using Chai for assertions. If you don’t need Chai’s full feature set, I recommend using should.js instead. I only have unit tests at the moment, though you can write integration tests with Mocha as well.

    Be sure to place your tests in the “tests” folder so that Meteor does not attempt to execute your tests.

    Mocha supports CoffeeScript, my choice of scripting language for Meteor projects. Here’s a sample Cakefile with tasks for running your Mocha tests. If you are using JS with Meteor, feel free to adapt the commands for a Makefile.

    Your Meteor models will need a slight bit of modification to expose themselves to Mocha, and this requires some knowledge of how Node.js works. Think of each Node.js file as being executed within its own scope. Meteor automatically exposes objects in different files to one another, but ordinary Node applications—like Mocha—do not do this. To make our models testable by Mocha, export each Meteor model with the following CoffeeScript pattern:

    # Export our class to Node.js when running
    # other modules, e.g. our Mocha tests
    #
    # Place this at the bottom of our Model.coffee
    # file after our Model class has been defined.
    exports.Model = Model unless Meteor?
    

    …and at the top of your Mocha test, import the model you wish to test:

    # Need to use Coffeescript's destructuring to reference
    # the object bound in the returned scope
    # http://coffeescript.org/#destructuring
    {Model} = require '../path/to/model'
    

    With that, you can start writing and running unit tests with your Meteor project!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Don't know if this is strictly on-topic, but I don't see any better Stack
don't know if the title describes anything about what I'm trying to say but
Don't know if I'm missing something here. I'd like to run multiple global variables
Don't ask why, but is there any way to suppress a failed linking error?
Don't be afraid to use any technical jargon or low-level explanations for things, please.
Don't get me wrong PDO is great but what I don't like about it,
Don't ask me how but I'm in a situation where I have DCPs published
don't know what happened in my jcrop selection. I think I pressed some keys
Don't be scared of the extensive code. The problem is general. I just provided
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.