mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Add test for namespaces containing a slash
This commit is contained in:
parent
4142d3bfe6
commit
5003ad4622
1 changed files with 16 additions and 0 deletions
|
|
@ -691,4 +691,20 @@ test('Prerelease suffixes are ignored when namespaces are set', async () => {
|
|||
const result = await repo.runAction();
|
||||
|
||||
expect(result.formattedVersion).toBe('1.0.1+1');
|
||||
}, 15000);
|
||||
|
||||
test('Namespace can contains a slash', async () => {
|
||||
const repo = createTestRepo({ tagPrefix: '' }); // 0.0.0
|
||||
|
||||
repo.makeCommit('Initial Commit'); // 0.0.1
|
||||
repo.exec('git tag 0.0.1');
|
||||
repo.makeCommit('Second Commit'); // 0.0.2
|
||||
repo.exec('git tag 0.1.0-sub/project');
|
||||
repo.makeCommit('Third Commit'); // 0.0.2 / 0.1.1
|
||||
|
||||
const result = await repo.runAction();
|
||||
const subprojectResult = await repo.runAction({ namespace: "sub/project" });
|
||||
|
||||
expect(result.formattedVersion).toBe('0.0.2+1');
|
||||
expect(subprojectResult.formattedVersion).toBe('0.1.1+0');
|
||||
}, 15000);
|
||||
Loading…
Reference in a new issue