Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/project_find_file_spec.js')
-rw-r--r--spec/frontend/project_find_file_spec.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/frontend/project_find_file_spec.js b/spec/frontend/project_find_file_spec.js
index 6a50f68a4e9..1af97dbca0a 100644
--- a/spec/frontend/project_find_file_spec.js
+++ b/spec/frontend/project_find_file_spec.js
@@ -7,7 +7,7 @@ import axios from '~/lib/utils/axios_utils';
jest.mock('~/lib/dompurify', () => ({
addHook: jest.fn(),
- sanitize: jest.fn(val => val),
+ sanitize: jest.fn((val) => val),
}));
const BLOB_URL_TEMPLATE = `${TEST_HOST}/namespace/project/blob/master`;
@@ -39,7 +39,7 @@ describe('ProjectFindFile', () => {
element
.find('.tree-table tr')
.toArray()
- .map(el => ({
+ .map((el) => ({
text: el.textContent,
href: el.querySelector('a').href,
}));
@@ -53,12 +53,15 @@ describe('ProjectFindFile', () => {
{ path: 'folde?rC/fil#F.txt', escaped: 'folde%3FrC/fil%23F.txt' },
];
- beforeEach(done => {
+ beforeEach((done) => {
// Create a mock adapter for stubbing axios API requests
mock = new MockAdapter(axios);
element = $(TEMPLATE);
- mock.onGet(FILE_FIND_URL).replyOnce(200, files.map(x => x.path));
+ mock.onGet(FILE_FIND_URL).replyOnce(
+ 200,
+ files.map((x) => x.path),
+ );
getProjectFindFileInstance(); // This triggers a load / axios call + subsequent render in the constructor
setImmediate(done);