es2019.js 542 B

123456789101112131415
  1. var test = require('tap').test;
  2. var detective = require('../');
  3. var fs = require('fs');
  4. test('es2019 - for-await', function (t) {
  5. var src = fs.readFileSync(__dirname + '/files/for-await.js');
  6. t.doesNotThrow(detective.bind(detective, src), 'Files with `for await()` do not throw')
  7. t.end();
  8. });
  9. test('es2019 - optional-catch', function (t) {
  10. var src = fs.readFileSync(__dirname + '/files/optional-catch.js');
  11. t.doesNotThrow(detective.bind(detective, src), 'Files with omitted catch binding do not throw')
  12. t.end();
  13. });