debian-mirror-gitlab/spec/frontend/filtered_search/services/recent_searches_service_error_spec.js

19 lines
690 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import RecentSearchesServiceError from '~/filtered_search/services/recent_searches_service_error';
describe('RecentSearchesServiceError', () => {
let recentSearchesServiceError;
beforeEach(() => {
recentSearchesServiceError = new RecentSearchesServiceError();
});
it('instantiates an instance of RecentSearchesServiceError and not an Error', () => {
2019-07-31 22:56:46 +05:30
expect(recentSearchesServiceError).toEqual(expect.any(RecentSearchesServiceError));
2017-08-17 22:00:37 +05:30
expect(recentSearchesServiceError.name).toBe('RecentSearchesServiceError');
});
it('should set a default message', () => {
expect(recentSearchesServiceError.message).toBe('Recent Searches Service is unavailable');
});
});