Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

precedence.js 646B

1234567891011121314151617181920212223
  1. var path = require('path');
  2. var test = require('tape');
  3. var resolve = require('../');
  4. test('precedence', function (t) {
  5. t.plan(3);
  6. var dir = path.join(__dirname, 'precedence/aaa');
  7. resolve('./', { basedir: dir }, function (err, res, pkg) {
  8. t.ifError(err);
  9. t.equal(res, path.join(dir, 'index.js'));
  10. t.equal(pkg.name, 'resolve');
  11. });
  12. });
  13. test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
  14. t.plan(1);
  15. var dir = path.join(__dirname, 'precedence/bbb');
  16. resolve('./', { basedir: dir }, function (err, res, pkg) {
  17. t.ok(err);
  18. });
  19. });