Skip to content

numtel/tinytest-fixture-account

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tinytest Account Fixture Meteor Package

Create a fixture account for running tests that require being logged in and then remove the account when complete.

Build Status

Installation

The accounts-password package must be installed to use this package.

$ meteor add accounts-password numtel:tinytest-fixture-account

Example in Coffeescript

if Meteor.isClient
  Tinytest.addAsync 'needs an account to run', (test, done) ->
    fixtureAccount done, {}, (error, cleanup) ->
      # Error will be thrown if username exists
      throw error if error 

      # ... Perform test while logged in

      # Remove fixture account, done() is called automatically
      cleanup()

Run Tests

$ git clone https://github.com/numtel/tinytest-fixture-account.git
$ cd tinytest-fixture-account
$ meteor test-packages ./

Open your browser to http://localhost:3000/

License

MIT

About

Tinytest fixture to create a user account for client-side tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages