You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 line
594 B

  1. // Verify that custom promises work as advertised.
  2. var PrPromise = require('prfun');
  3. var assert = require('../assert');
  4. var fs = require('../fs');
  5. describe('Verify that custom promises can be used', function() {
  6. var oldPromise;
  7. before(function() {
  8. oldPromise = require('../_promise')();
  9. require('../_promise')(PrPromise);
  10. });
  11. after(function() {
  12. require('../_promise')(oldPromise);
  13. });
  14. it('exists should use the custom promise type', function() {
  15. var p = fs.exists('abc');
  16. assert.equal(p instanceof PrPromise, true);
  17. });
  18. });