(ctor, code)
| 63 | test(error.UnsupportedOperationError, 'unsupported operation') |
| 64 | |
| 65 | function test(ctor, code) { |
| 66 | it(`${ctor.name} => "${code}"`, () => { |
| 67 | runTest(new ctor('oops'), code, 'oops') |
| 68 | }) |
| 69 | } |
| 70 | |
| 71 | function runTest(err, code, message) { |
| 72 | let obj = error.encodeError(err) |