summaryrefslogtreecommitdiff
path: root/spec/frontend/ref/components/ref_selector_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ref/components/ref_selector_spec.js')
-rw-r--r--spec/frontend/ref/components/ref_selector_spec.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/spec/frontend/ref/components/ref_selector_spec.js b/spec/frontend/ref/components/ref_selector_spec.js
index 7f0a4c7d3f4..7efb6e9ba4a 100644
--- a/spec/frontend/ref/components/ref_selector_spec.js
+++ b/spec/frontend/ref/components/ref_selector_spec.js
@@ -37,7 +37,7 @@ describe('Ref selector component', () => {
attrs,
listeners: {
// simulate a parent component v-model binding
- input: selectedRef => {
+ input: (selectedRef) => {
wrapper.setProps({ value: selectedRef });
},
},
@@ -61,13 +61,13 @@ describe('Ref selector component', () => {
mock
.onGet(`/api/v4/projects/${projectId}/repository/branches`)
- .reply(config => branchesApiCallSpy(config));
+ .reply((config) => branchesApiCallSpy(config));
mock
.onGet(`/api/v4/projects/${projectId}/repository/tags`)
- .reply(config => tagsApiCallSpy(config));
+ .reply((config) => tagsApiCallSpy(config));
mock
.onGet(new RegExp(`/api/v4/projects/${projectId}/repository/commits/.*`))
- .reply(config => commitApiCallSpy(config));
+ .reply((config) => commitApiCallSpy(config));
});
afterEach(() => {
@@ -122,7 +122,7 @@ describe('Ref selector component', () => {
//
// Convenience methods
//
- const updateQuery = newQuery => {
+ const updateQuery = (newQuery) => {
findSearchBox().vm.$emit('input', newQuery);
};
@@ -313,9 +313,7 @@ describe('Ref selector component', () => {
it('renders the "Branches" heading with a total number indicator', () => {
expect(
- findBranchesSection()
- .find('[data-testid="section-header"]')
- .text(),
+ findBranchesSection().find('[data-testid="section-header"]').text(),
).toMatchInterpolatedText('Branches 123');
});
@@ -336,7 +334,7 @@ describe('Ref selector component', () => {
it('renders the default branch as a selectable item with a "default" badge', () => {
const dropdownItems = findBranchDropdownItems();
- const defaultBranch = fixtures.branches.find(b => b.default);
+ const defaultBranch = fixtures.branches.find((b) => b.default);
const defaultBranchIndex = fixtures.branches.indexOf(defaultBranch);
expect(trimText(dropdownItems.at(defaultBranchIndex).text())).toBe(
@@ -392,9 +390,7 @@ describe('Ref selector component', () => {
it('renders the "Tags" heading with a total number indicator', () => {
expect(
- findTagsSection()
- .find('[data-testid="section-header"]')
- .text(),
+ findTagsSection().find('[data-testid="section-header"]').text(),
).toMatchInterpolatedText('Tags 456');
});
@@ -460,9 +456,7 @@ describe('Ref selector component', () => {
it('renders the "Commits" heading with a total number indicator', () => {
expect(
- findCommitsSection()
- .find('[data-testid="section-header"]')
- .text(),
+ findCommitsSection().find('[data-testid="section-header"]').text(),
).toMatchInterpolatedText('Commits 1');
});