Skip to content

Commit

Permalink
test: add test for prerelease version.rb verification
Browse files Browse the repository at this point in the history
  • Loading branch information
rylanc committed Jul 22, 2020
1 parent d079b25 commit 039f996
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/__tests__/verifyConditions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ it('verifies the version file', async () => {
expect(versionFile).toEqual('lib/test-gem/version.rb');
});

describe('when the existing version file contains a prerelease version', () => {
it('verifies the version file', async () => {
const cwd = path.resolve(__dirname, './fixtures/prerelease');
const { versionFile } = await verifyConditions(
{},
{ cwd, env: defaultEnv },
{ credentialsFile },
);
expect(versionFile).toEqual('lib/test-gem/version.rb');
});
});

describe('when there is no version file', () => {
it('throws an error', async () => {
const cwd = path.resolve(__dirname, './fixtures/no-version-file');
Expand Down

0 comments on commit 039f996

Please sign in to comment.