Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
electron
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ExcellentOSS
electron
Commits
fb2d60b8
Commit
fb2d60b8
authored
1 year ago
by
mlaurencin
Browse files
Options
Downloads
Patches
Plain Diff
add tests
parent
6a0906b5
Branches
chore-fix-notes-stack-updates
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/release-notes-spec.ts
+47
-0
47 additions, 0 deletions
spec/release-notes-spec.ts
with
47 additions
and
0 deletions
spec/release-notes-spec.ts
+
47
−
0
View file @
fb2d60b8
...
...
@@ -211,4 +211,51 @@ describe('release notes', () => {
expect
(
results
.
breaking
[
0
].
hash
).
to
.
equal
(
testCommit
.
sha1
);
});
});
// test that when you have multiple stack updates only the
// latest will be kept
describe
(
'
superseding stack updates
'
,
()
=>
{
const
oldBranch
=
'
27-x-y
'
;
const
newBranch
=
'
28-x-y
'
;
const
version
=
'
v28.0.0
'
;
it
(
'
with different major versions
'
,
async
function
()
{
const
mostRecentCommit
=
new
Commit
(
'
9d0e6d09f0be0abbeae46dd3d66afd96d2daacaa
'
,
'
chore: bump chromium to 119.0.6043.0
'
);
const
sharedChromiumHistory
=
[
new
Commit
(
'
029127a8b6f7c511fca4612748ad5b50e43aadaa
'
,
'
chore: bump chromium to 118.0.5993.0
'
)
// merge-base
];
const
chromiumPatchUpdates
=
[
new
Commit
(
'
d9ba26273ad3e7a34c905eccbd5dabda4eb7b402
'
,
'
chore: bump chromium to 118.0.5991.0
'
),
mostRecentCommit
,
new
Commit
(
'
d6c8ff2e7050f30dffd784915bcbd2a9f993cdb2
'
,
'
chore: bump chromium to 119.0.6029.0
'
)
];
gitFake
.
setBranch
(
oldBranch
,
sharedChromiumHistory
);
gitFake
.
setBranch
(
newBranch
,
[...
sharedChromiumHistory
,
...
chromiumPatchUpdates
]);
const
results
:
any
=
await
notes
.
get
(
oldBranch
,
newBranch
,
version
);
expect
(
results
.
other
).
to
.
have
.
lengthOf
(
1
);
expect
(
results
.
other
[
0
].
hash
).
to
.
equal
(
mostRecentCommit
.
sha1
);
});
it
(
'
with different build versions
'
,
async
function
()
{
const
mostRecentCommit
=
new
Commit
(
'
8f7a48879ef8633a76279803637cdee7f7c6cd4f
'
,
'
chore: bump chromium to 119.0.6045.0
'
);
const
sharedChromiumHistory
=
[
new
Commit
(
'
029127a8b6f7c511fca4612748ad5b50e43aadaa
'
,
'
chore: bump chromium to 118.0.5993.0
'
)
// merge-base
];
const
chromiumPatchUpdates
=
[
mostRecentCommit
,
new
Commit
(
'
9d0e6d09f0be0abbeae46dd3d66afd96d2daacaa
'
,
'
chore: bump chromium to 119.0.6043.0
'
),
new
Commit
(
'
d6c8ff2e7050f30dffd784915bcbd2a9f993cdb2
'
,
'
chore: bump chromium to 119.0.6029.0
'
)
];
gitFake
.
setBranch
(
oldBranch
,
sharedChromiumHistory
);
gitFake
.
setBranch
(
newBranch
,
[...
sharedChromiumHistory
,
...
chromiumPatchUpdates
]);
const
results
:
any
=
await
notes
.
get
(
oldBranch
,
newBranch
,
version
);
expect
(
results
.
other
).
to
.
have
.
lengthOf
(
1
);
expect
(
results
.
other
[
0
].
hash
).
to
.
equal
(
mostRecentCommit
.
sha1
);
});
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment