Questions tagged [tinytest]

TinyTest is the package testing framework for Meteor. It can't test applications themselves - for that, use Velocity.

TinyTest is the package testing framework for . It can't test applications themselves - for that, use .

Learn

20 questions
4
votes
2 answers

How to test Meteor packages since Meteor 1.0?

From what I understand, there are two major packages that help in testing a package - TinyTest, and Velocity, which became the official Meteor testing framework. From the Meteor's DevShop in June, the Velocity team said that Velocity can run…
dayuloli
  • 16,205
  • 16
  • 71
  • 126
4
votes
1 answer

Exit Meteor Tinytest after after all tests have been completed

When running meteor test-packages ./ from automated tests (e.g. grunt files), it would help if meteor exited after the tests were run. Is there a way to do that? The command line help doesn't suggest anything of that sort and this issue suggests…
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
2
votes
0 answers

How do I write customized unit tests in R?

I am using the tinytest package for unit testing and wanted to modify some of the tests which did not work out. To boil down the problem I give the following example. I define a new function expect_equal_new <- function(a,b){expect_equal(a,b)} If I…
Alexander
  • 31
  • 2
2
votes
1 answer

How do I run only one test using Meteor and TinyTest?

I'm using the "test-packages" command to run my meteor package tests. meteor test-packages --once --driver-package 'test-in-console' -p 4096 package:name I'd like to be able to run only one test or a subset of tests given a pattern. Is this…
AngelCabo
  • 161
  • 2
  • 7
2
votes
1 answer

Meteor - Run package tests with test database

(This is similar to this question: How to set up separate test and development database in meteor, however it's 2 years old and meteor has changed a lot since then.) I'm trying to create my own package and I want to run unit tests. I want to ensure…
samanime
  • 25,408
  • 15
  • 90
  • 139
2
votes
1 answer

Pull an HTML file into a TinyTest

TinyTest seems to be concerned only with unit testing; however, may Meteor packages have UI elements, and it would be helpful to pull in a pre-crafted HTML file that exercises a widget. For instance, we might want to transform a into a grid…
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
1
vote
1 answer

How to test a server side debugOnly package

I don't understand how it is possible to test a package that is debugOnly. My package.js is quite simple : Package.describe({ name: 'lambda', version: '0.0.1', debugOnly: true // Will not be packaged into the production…
Ser
  • 2,661
  • 23
  • 28
1
vote
1 answer

Testing with Tinytest exceptions

I am working on unit test using Tinytest in a package and I wanted to test that a method raise an exception and I can test it using test.throws(). I create a meteor project : meteor create myapp cd myapp meteor add tinytest To create a package, I…
Ser
  • 2,661
  • 23
  • 28
1
vote
0 answers

Is it appropriate to rely on Meteor.settings in package autotest?

My package relies on Meteor.settings, a certain property that has to contain certain values. Whether it is appropriate to check for it in the auto test of the package? Depending on settings, the package may or may not throw Meteor.Errors and return…
rishat
  • 8,206
  • 4
  • 44
  • 69
1
vote
1 answer

Marking tests as pending in tinytest/Meteor

Is there something like xit of mocha to mark tests as pending in tinytest/meteor? I tried not passing a function but it raises undefined it's not a function. I also tried pending, skip. But nothing. :/
thr0w
  • 1,454
  • 3
  • 10
  • 7
1
vote
1 answer

Meteor Tinytest loginWithPassword

I'm confused. So I created a Meteor package called my_package and now I want to test it using Tinytest. Right now I am trying to get one simple test working: testing to make sure an admin user can log…
fire_water
  • 1,380
  • 1
  • 19
  • 33
1
vote
1 answer

How do I run Tinytest on an android device for testing package for meteor-cordova app?

I want to test cordova specific feature of meteor-package using Tinytest on android device. So I have tried the steps found here. My test file cordova-test.js contains only the following if (Meteor.isCordova) { Tinytest.add("cordova-package -…
SG_
  • 1,316
  • 14
  • 26
1
vote
0 answers

How to use more advanced features in TinyTest?

I am using TinyTest to run my unit tests, but I am struggling to find official documentation on the more advanced methods. There's of course the EventedMind video, the Meteor Cookbook. numtel provides some unofficial documentation in his repo. But…
dayuloli
  • 16,205
  • 16
  • 71
  • 126
1
vote
1 answer

Meteor Tinytest packages dependencies

I like to test my code. I like to compartmentalize my code into packages. And I like Meteor. Now I'm trying Meteor Tinytest meteor test-packages, but I'm getting some weirdness. For example: TypeError: Cannot read property 'Email' of…
the
  • 21,007
  • 11
  • 68
  • 101
1
vote
1 answer

Get the name of the package that TinyTest is testing

I need to determine the name of the Meteor package that a given test file is currently testing, so that I can derive the path to assets. For example, if we're testing fortawesome:fontawesome, the assets will be accessible at…
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
1
2