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.

22 lines
382 B

  1. /**
  2. * Module dependencies.
  3. */
  4. var assert = require('assert');
  5. var global;
  6. try {
  7. // component
  8. global = require('global');
  9. } catch (e) {
  10. // node.js
  11. global = require('../');
  12. }
  13. describe('global', function () {
  14. it('should return the `global` object', function () {
  15. var str = String(global);
  16. assert('[object global]' == str || '[object Window]' == str);
  17. });
  18. });