forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
522 B
14 lines
522 B
import { invalidNamespaceError } from '../__mocks__/errors';
|
|
import messageFromError from './messageFromError';
|
|
|
|
describe('AzureMonitor: messageFromError', () => {
|
|
it('returns message from Error exception', () => {
|
|
const err = new Error('wowee an error');
|
|
expect(messageFromError(err)).toBe('wowee an error');
|
|
});
|
|
|
|
it('returns message from Azure API error', () => {
|
|
const err = invalidNamespaceError();
|
|
expect(messageFromError(err)).toBe("The resource namespace 'grafanadev' is invalid.");
|
|
});
|
|
});
|
|
|