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.

15 lines
542 B

2 years ago
  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. });