Guest User

Untitled

a guest
Nov 21st, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. exports.deleteAll = function () {
  2. return sequelize.drop({logging: false, cascade: true}).then(function() {
  3. return sequelize.sync({logging: false});
  4. });
  5. };
  6.  
  7. var testutils = require("../../lib/testutils");
  8.  
  9. describe("CRUD Controller", function() {
  10. beforeEach(function(done) {
  11. testutils.deleteAll().then(function(){
  12. done();
  13. }).catch(function(err) {
  14. return done(err);
  15. });
  16. });
  17.  
  18. describe("#read()", function(){
  19. it("should....", function(done) {
  20. });
  21. });
  22. }
  23.  
  24. var testutils = require("../../lib/testutils");
  25.  
  26. describe("CRUD Controller", function() {
  27. beforeEach(function(done) {
  28. testutils.deleteAll().then(done).catch(function(err) {
  29. return done(err);
  30. });
  31. });
  32.  
  33. describe("#read()", function(){
  34. it("should....", function(done) {
  35. });
  36. });
  37. }
  38.  
  39. beforeEach(function(){
  40. return testutils.deleteAll();
  41. });
  42.  
  43. User.create({name: 'aName'}).then(function(user){console.log(user)});
  44.  
  45. User.create({name: 'aName'}).then(console.log);
Add Comment
Please, Sign In to add comment