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.

index.js 471B

1234567891011121314151617
  1. 'use strict';
  2. var getDescriptors = require('../');
  3. var test = require('tape');
  4. var runTests = require('./tests');
  5. test('as a function', function (t) {
  6. t.test('bad object/this value', function (st) {
  7. st['throws'](function () { return getDescriptors(undefined); }, TypeError, 'undefined is not an object');
  8. st['throws'](function () { return getDescriptors(null); }, TypeError, 'null is not an object');
  9. st.end();
  10. });
  11. runTests(getDescriptors, t);
  12. t.end();
  13. });