HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/www/french-american.org/current/node_modules/snyk-tree/test/index.test.js
var test = require('tap').test;
var lib = require('../');
var fixture = require(__dirname + '/fixture.json');
var expect = require('fs').readFileSync(__dirname + '/fixture.txt', 'utf8').trim();
var expect2 = require('fs').readFileSync(__dirname + '/fixture-custom.txt', 'utf8').trim();

test('npm-tree', function (t) {
  t.equal(lib(fixture).trim(), expect, 'matches');
  t.end();
});

test('npm-tree custom render', function (t) {
  var r = function (leaf) {
    return leaf.name;
  };

  t.equal(lib(fixture, r).trim(), expect2, 'matches');
  t.end();
});