-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jahed Ahmed
committed
Jan 25, 2022
1 parent
8aa6f60
commit 2e7a052
Showing
3 changed files
with
25 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { getPathWithOptionalProjectName } from '../../../../../../src/cli/commands/test/utils'; | ||
|
||
describe('getPathWithOptionalProjectName', () => { | ||
test.each([ | ||
{ | ||
projectName: '', | ||
}, | ||
{ | ||
projectName: 'anything', | ||
}, | ||
])('returns given path', () => { | ||
const result = getPathWithOptionalProjectName('/tmp/hydra', { | ||
projectName: '', | ||
}); | ||
expect(result).toEqual('/tmp/hydra'); | ||
}); | ||
|
||
test('appends subdirectory from project name', () => { | ||
const result = getPathWithOptionalProjectName('/tmp/hydra', { | ||
projectName: 'anything/subdir', | ||
}); | ||
expect(result).toEqual('/tmp/hydra/subdir'); | ||
}); | ||
}); |