useragent.js 449 B

123456789101112131415
  1. var assert = require('assert'),
  2. pkg = require('../package.json'),
  3. ua = require('../scripts/util/useragent');
  4. describe('util', function() {
  5. describe('useragent', function() {
  6. it('should look as we expect', function() {
  7. var reNode = 'node/' + process.version;
  8. var reSass = 'node-sass-installer/' + pkg.version;
  9. var reUA = new RegExp('^' + reNode + ' ' + reSass + '$');
  10. assert.ok(reUA.test(ua()));
  11. });
  12. });
  13. });