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/static_site_editor/services/generate_branch_name_spec.js')
-rw-r--r--spec/frontend/static_site_editor/services/generate_branch_name_spec.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/spec/frontend/static_site_editor/services/generate_branch_name_spec.js b/spec/frontend/static_site_editor/services/generate_branch_name_spec.js
deleted file mode 100644
index 7e437506a16..00000000000
--- a/spec/frontend/static_site_editor/services/generate_branch_name_spec.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import { BRANCH_SUFFIX_COUNT } from '~/static_site_editor/constants';
-import generateBranchName from '~/static_site_editor/services/generate_branch_name';
-
-import { username, branch as targetBranch } from '../mock_data';
-
-describe('generateBranchName', () => {
- const timestamp = 12345678901234;
-
- beforeEach(() => {
- jest.spyOn(Date, 'now').mockReturnValueOnce(timestamp);
- });
-
- it('generates a name that includes the username and target branch', () => {
- expect(generateBranchName(username, targetBranch)).toMatch(`${username}-${targetBranch}`);
- });
-
- it(`adds the first ${BRANCH_SUFFIX_COUNT} numbers of the current timestamp`, () => {
- expect(generateBranchName(username, targetBranch)).toMatch(
- timestamp.toString().substring(BRANCH_SUFFIX_COUNT),
- );
- });
-});