graphbrainz/test/api/client.js

15 lines
354 B
JavaScript
Raw Normal View History

import test from 'ava';
import Client from '../../src/api/client.js';
test('parseErrorMessage() returns the input error by default', (t) => {
const client = new Client();
const error = {
name: 'HTTPError',
response: {
statusCode: 500,
body: 'something went wrong',
},
};
t.is(client.parseErrorMessage(error), error);
});