require.js 496 B

12345678910111213141516171819
  1. // require.js
  2. // Tests JSON5's require() hook.
  3. //
  4. // Important: expects the following test cases to be present:
  5. // - /parse-cases/misc/npm-package.json
  6. // - /parse-cases/misc/npm-package.json5
  7. var assert = require('assert');
  8. exports['misc'] = {};
  9. exports['misc']['require hook'] = function () {
  10. require('../lib/require');
  11. var json = require('./parse-cases/misc/npm-package.json');
  12. var json5 = require('./parse-cases/misc/npm-package.json5');
  13. assert.deepEqual(json5, json);
  14. };