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 8358499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:48:45+00:00 2026-06-09T10:48:45+00:00

Is there a place where my tests can live without being run by Meteor?

  • 0

Is there a place where my tests can live without being run by Meteor?

I just started my first Meteor project, and began by writing unit tests with Mocha and should.js. Though mocha runs without a problem, the tests prevent Meteor from starting up since it has issues using node’s require instead of __meteor_bootstrap__.require (full error message).

That being said, Meteor should not be running my tests! According to the Meteor documentation, code can only be placed on the client, server, or both. Unit test suites do no belong in these categories, and I am not the only person confused by Meteor’s lack of a well-defined location for placing automated tests.

Right now, my tests are kept in server/test/, with the contents of each file wrapped in the block:

if (typeof(Meteor) === 'undefined') { ... }

While this works, it does not feel elegant. Do you have any other suggestions for structuring your tests with your Meteor app?

Update: in lieu of explicit instructions in the Meteor docs, I followed the Rails folder conventions (4th paragraph), using a folder called test for storing my testing assets. I later moved this to server/test since I did not want it loaded on the client.

  • 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-09T10:48:46+00:00Added an answer on June 9, 2026 at 10:48 am

    Place your tests in the tests/ folder. Unlike Rails, which uses a folder named test for this purpose, Meteor uses the plural tests for this folder name.

    Assets stored in a folder named “tests” will be completely ignored by Meteor; these assets will not be loaded on the client or server.

    Ironically, I was tipped off by someone having the opposite issue who wants their tests loaded by the Meteor client.

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

Sidebar

Related Questions

Is there a place when I can put default imports for all my modules?
Is there a place where I can find all the keycodes for keys on
Is there a central place where I can find the specs for the majority
I have 2 namespaces: Project.Core; Tests.Project.Core; In Project.Core there is a Class named Text
When writing unit tests, do you place your tests inside the assembly you wish
Consider the path to a file like this: \\Tests\Results\knowles\project\LU\D15\RUN1\Results.xml How can I make a
Is there a place (or flag) in Xcode for files that you don't want
Is there any place that showcases a bunch of different types of rating systems
Quite simply: is there a place such as DeviantArt, but purely for the purpose
I'm working on a game bot. I'd like to place there something like a

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.