testRpt.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * Created by Tony on 2017/3/17.
  3. */
  4. var test = require('tape');
  5. var cmn_ctrl = require('../../../modules/reports/models/cfg_control');
  6. var cmn_font = require('../../../modules/reports/models/cfg_font');
  7. var cmn_style = require('../../../modules/reports/models/cfg_style');
  8. var mongoose = require('mongoose');
  9. test('test get report pages function: ', function (t) {
  10. /*/
  11. t.plan(1);
  12. t.equal(2 + 3, 5);
  13. /*/
  14. cmn_ctrl.getAll(null, function(err, ctrls){
  15. t.notEqual(ctrls, null);
  16. t.end();
  17. return true;
  18. });
  19. //*/
  20. });
  21. test('test get report pages function: ', function (t) {
  22. /*/
  23. t.plan(1);
  24. t.equal(7 * 8 + 9, 65);
  25. /*/
  26. cmn_font.getAll(null, function(err, fonts){
  27. t.notEqual(fonts, null);
  28. t.end();
  29. return true;
  30. });
  31. //*/
  32. });
  33. test('test get report pages function: ', function (t) {
  34. /*/
  35. t.plan(1);
  36. t.equal(1+2, 65);
  37. /*/
  38. cmn_style.getAll(null, function(err, styles){
  39. t.notEqual(styles, null);
  40. t.end();
  41. return true;
  42. });
  43. //*/
  44. });
  45. test('finish', function (t) {
  46. mongoose.disconnect();
  47. t.pass('closing db connection');
  48. t.end();
  49. });