drek
Version:
A static-code-analysis tool that can be used to perform security-focused code reviews. It enables an auditor to swiftly map the attack-surface of a large application, with an emphasis on identifying development anti-patterns and footguns.
16 lines (12 loc) • 379 B
JavaScript
const decorate = require('../app/decorate-json');
const test = require('tape');
test('decorate-json: return a JSON string', function (t) {
t.plan(1);
// mock a (very simplified) array of matches
const matches = [{ foo : 'bar' }];
// assert that the matches are stringified
t.equals(
decorate({}, {}, matches),
JSON.stringify(matches, null, ' ')
);
});