asyncfunction.js 693 B

123456789101112131415161718192021
  1. 'use strict';
  2. describe('async functions', function() {
  3. var docSet = jasmine.getDocSetFromFile('test/fixtures/asyncfunction.js');
  4. var add = docSet.getByLongname('add')[0];
  5. var subtract = docSet.getByLongname('subtract')[0];
  6. var adderAdd = docSet.getByLongname('Adder#add')[0];
  7. it('should automatically document async functions as async', function() {
  8. expect(add.async).toBe(true);
  9. });
  10. it('should work when the async function is assigned to a variable', function() {
  11. expect(subtract.async).toBe(true);
  12. });
  13. it('should work when the async function is a method definition', function() {
  14. expect(adderAdd.async).toBe(true);
  15. });
  16. });