meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 365 forks source link

Consider using ecwyne:describe-target package #118

Closed ecwyne closed 8 years ago

ecwyne commented 8 years ago

Instead of placing tests in a separate client/server directory or wrapping describes in Meteor.isServer/isClient blocks

You can use the ecwyne:describe-target package

serverDescribe('example server test', function(){
  it('only runs on the server', function(){
    expect(Meteor.isServer).to.equal(true);
  });
});
clientDescribe('example client test', function(){
  it('only runs on the client', function(){
    expect(Meteor.isClient).to.equal(true);
  });
});