1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/traverse/test/error.js

14 lines
251 B
JavaScript
Raw Permalink Normal View History

2024-01-16 21:26:16 +08:00
'use strict';
2023-12-18 13:12:25 +08:00
var test = require('tape');
var traverse = require('../');
test('traverse an Error', function (t) {
2024-01-16 21:26:16 +08:00
var obj = new Error('test');
var results = traverse(obj).map(function () {});
t.same(results, { message: 'test' });
t.end();
2023-12-18 13:12:25 +08:00
});