Skip to content

Instantly share code, notes, and snippets.

@jepetko
Created March 15, 2019 13:53
Show Gist options
  • Save jepetko/d89dd7e30b8032b48d6cfa23bc94259f to your computer and use it in GitHub Desktop.
Save jepetko/d89dd7e30b8032b48d6cfa23bc94259f to your computer and use it in GitHub Desktop.
FeathersJS Authentication beforeEach
beforeEach(async () => {
const client: Sequelize.Sequelize = app.get('sequelizeClient');
const models = client.models as {[name: string]: Sequelize.Model<any, any>};
const UserModel = models.users as Sequelize.Model<User, UserAttrs>;
await UserModel.destroy({truncate: true});
setupUserRelatedFactory(UserModel);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment