gitlab-ce/spec/frontend_integration/test_helpers/mock_server/routes/404.js

11 lines
297 B
JavaScript

import { Response } from 'miragejs';
import { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status';
export default (server) => {
['get', 'post', 'put', 'delete', 'patch'].forEach((method) => {
server[method]('*', () => {
return new Response(HTTP_STATUS_NOT_FOUND);
});
});
};