Files
cypress/scripts/unit/npm-release-spec.js
Zachary Williams 4ded6c9624 fix: remove outdated npm registry links (#18727)
* fix: remove outdated npm registry links

* revert cypress schematic change

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2021-11-09 10:14:03 +10:00

335 lines
25 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const la = require('lazy-ass')
const { parseSemanticReleaseOutput } = require('../npm-release')
const semanticReleasePullRequest = `
[semantic-release] Running semantic-release version 17.1.1
[semantic-release] ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[semantic-release] ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
[semantic-release] ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
[semantic-release] ✔ Loaded plugin "prepare" from "@semantic-release/git"
[semantic-release] ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "publish" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[semantic-release] This run was triggered by a pull request and therefore a new version won't be published.
`
const semanticReleaseNoUpdate = (version) => {
return `
[semantic-release] Running semantic-release version 17.1.1
[semantic-release] ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "publish" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[semantic-release] ⚠ Run automated release from branch master on repository https://github.com/cypress-io/cypress.git in dry-run mode
[semantic-release] ✔ Allowed to push to the Git repository
[semantic-release] Start step "verifyConditions" of plugin "@semantic-release/npm"
[semantic-release] [@semantic-release/npm] Verify authentication for registry https://registry.npmjs.org/
[semantic-release] [@semantic-release/npm] Reading npm config from /cypress/npm/package/.npmrc
[semantic-release] ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
[semantic-release] Found git tag @cypress/package-v${version} associated with version ${version} on branch master
[semantic-release] Found 1 commits since last release
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] [[Function: semantic-release-monorepo]] Found 0 commits for package @cypress/package since last release
[semantic-release] [[Function: semantic-release-monorepo]] Analysis of 0 commits complete: no release
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] There are no relevant changes, so no new version is released.
`
}
const semanticReleaseUpdate = (oldVersion, newVersion) => {
return `
[semantic-release] Running semantic-release version 17.1.1
[semantic-release] ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "publish" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[semantic-release] ⚠ Run automated release from branch master on repository https://github.com/cypress-io/cypress.git in dry-run mode
[semantic-release] ✔ Allowed to push to the Git repository
[semantic-release] Start step "verifyConditions" of plugin "@semantic-release/npm"
[semantic-release] [@semantic-release/npm] Verify authentication for registry https://registry.npmjs.org/
[semantic-release] [@semantic-release/npm] Reading npm config from /cypress/npm/package/.npmrc
[semantic-release] ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
[semantic-release] Found git tag @cypress/package-v${oldVersion} associated with version ${oldVersion} on branch master
[semantic-release] Found 2 commits since last release
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] [[Function: semantic-release-monorepo]] Found 1 commits for package @cypress/package since last release
[semantic-release] [[Function: semantic-release-monorepo]] Analyzing commit: fix: bug
[semantic-release] [[Function: semantic-release-monorepo]] The release type for the commit is patch
[semantic-release] [[Function: semantic-release-monorepo]] Analysis of 1 commits complete: patch release
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] The next release version is ${newVersion}
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] [[Function: semantic-release-monorepo]] Found 1 commits for package @cypress/package since last release
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ⚠ Skip step "prepare" of plugin "@semantic-release/npm" in dry-run mode
[semantic-release] ⚠ Skip @cypress/package-v${newVersion} tag creation in dry-run mode
[semantic-release] ⚠ Skip step "publish" of plugin "@semantic-release/npm" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ✔ Published release ${newVersion} on default channel
[semantic-release] Release note for version ${newVersion}:
# @cypress/package-v${newVersion} (https://github.com/cypress-io/cypress/compare/@cypress/package-v${oldVersion}...@cypress/package-v${newVersion}) (2020-01-01)
### Bug Fixes
* bug (abcdef1 (https://github.com/cypress-io/cypress/commit/...))
`
}
const semanticReleaseNew = () => {
return `
[semantic-release] Running semantic-release version 17.1.1
[semantic-release] ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "publish" from "@semantic-release/npm"
[semantic-release] ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[semantic-release] ⚠ Run automated release from branch master on repository https://github.com/cypress-io/cypress.git in dry-run mode
[semantic-release] ✔ Allowed to push to the Git repository
[semantic-release] Start step "verifyConditions" of plugin "@semantic-release/npm"
[semantic-release] [@semantic-release/npm] Verify authentication for registry https://registry.npmjs.org/
[semantic-release] [@semantic-release/npm] Reading npm config from /cypress/npm/package/.npmrc
[semantic-release] ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
[semantic-release] No git tag version found on branch master
[semantic-release] No previous release found, retrieving all commits
[semantic-release] Found 100 commits since last release
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] [[Function: semantic-release-monorepo]] Found 1 commits for package @cypress/package since last release
[semantic-release] [[Function: semantic-release-monorepo]] Analyzing commit: feat: new
[semantic-release] [[Function: semantic-release-monorepo]] The release type for the commit is minor
[semantic-release] [[Function: semantic-release-monorepo]] Analysis of 1 commits complete: minor release
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] There is no previous release, the next release version is 1.0.0
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] [[Function: semantic-release-monorepo]] Found 1 commits for package @cypress/package since last release
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
[semantic-release] ⚠ Skip step "prepare" of plugin "@semantic-release/npm" in dry-run mode
[semantic-release] ⚠ Skip @cypress/package-v1.0.0 tag creation in dry-run mode
[semantic-release] ⚠ Skip step "publish" of plugin "@semantic-release/npm" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ⚠ Skip step "success" of plugin "[Function: semantic-release-monorepo]" in dry-run mode
[semantic-release] ✔ Published release 1.0.0 on default channel
[semantic-release] Release note for version 1.0.0:
# @cypress/package-v1.0.0 (2020-01-01)
### Features
* new (abcdef1 (https://github.com/cypress-io/cypress/commit/...))
`
}
describe('semantic release', () => {
it('ends with no output if triggered by a pull request', () => {
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleasePullRequest)
la(currentVersion === undefined, 'Expected current version to be', undefined, 'but got', currentVersion, 'instead')
la(nextVersion === undefined, 'Expected current version to be', undefined, 'but got', nextVersion, 'instead')
})
describe('parses old version number when there are no updates', () => {
it('works with standard version number', () => {
const version = '1.2.3'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseNoUpdate(version))
la(currentVersion === version, 'Expected current version to be', version, 'but got', currentVersion, 'instead')
la(nextVersion === undefined, 'Expected next version to be', undefined, 'but got', nextVersion, 'instead')
})
it('works with version 0.x.x', () => {
const version = '0.0.1'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseNoUpdate(version))
la(currentVersion === version, 'Expected current version to be', version, 'but got', currentVersion, 'instead')
la(nextVersion === undefined, 'Expected next version to be', undefined, 'but got', nextVersion, 'instead')
})
it('works with postfix alpha/beta version', () => {
const version = '0.1.2-alpha1.2'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseNoUpdate(version))
la(currentVersion === version, 'Expected current version to be', version, 'but got', currentVersion, 'instead')
la(nextVersion === undefined, 'Expected next version to be', undefined, 'but got', nextVersion, 'instead')
})
it('does not work with non-semver version', () => {
const version = 'abc'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseNoUpdate(version))
la(currentVersion === undefined, 'Expected current version to be', undefined, 'but got', currentVersion, 'instead')
la(nextVersion === undefined, 'Expected next version to be', undefined, 'but got', nextVersion, 'instead')
})
})
describe('parses new version number when there are updates', () => {
it('works with standard version numbers', () => {
const oldVersion = '1.2.3'
const newVersion = '1.2.4'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseUpdate(oldVersion, newVersion))
la(currentVersion === oldVersion, 'Expected current version to be', oldVersion, 'but got', currentVersion, 'instead')
la(nextVersion === newVersion, 'Expected next version to be', newVersion, 'but got', nextVersion, 'instead')
})
it('works with 0.x.x version numbers', () => {
const oldVersion = '0.0.1'
const newVersion = '0.1.0'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseUpdate(oldVersion, newVersion))
la(currentVersion === oldVersion, 'Expected current version to be', oldVersion, 'but got', currentVersion, 'instead')
la(nextVersion === newVersion, 'Expected next version to be', newVersion, 'but got', nextVersion, 'instead')
})
it('works with 0.x.x -> 1.0.0 version numbers', () => {
const oldVersion = '0.2.4'
const newVersion = '1.0.0'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseUpdate(oldVersion, newVersion))
la(currentVersion === oldVersion, 'Expected current version to be', oldVersion, 'but got', currentVersion, 'instead')
la(nextVersion === newVersion, 'Expected next version to be', newVersion, 'but got', nextVersion, 'instead')
})
it('works with postfix alpha/beta versions', () => {
const oldVersion = '0.2.4-alpha'
const newVersion = '0.3.0-beta'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseUpdate(oldVersion, newVersion))
la(currentVersion === oldVersion, 'Expected current version to be', oldVersion, 'but got', currentVersion, 'instead')
la(nextVersion === newVersion, 'Expected next version to be', newVersion, 'but got', nextVersion, 'instead')
})
it('works with postfix alpha/beta version -> 1.0.0', () => {
const oldVersion = '0.2.4-alpha'
const newVersion = '1.0.0'
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseUpdate(oldVersion, newVersion))
la(currentVersion === oldVersion, 'Expected current version to be', oldVersion, 'but got', currentVersion, 'instead')
la(nextVersion === newVersion, 'Expected next version to be', newVersion, 'but got', nextVersion, 'instead')
})
})
describe('parses new version number when there are no existing releases', () => {
it('reports next version as 1.0.0', () => {
const { currentVersion, nextVersion } = parseSemanticReleaseOutput(semanticReleaseNew())
la(currentVersion === undefined, 'Expected current version to be', undefined, 'but got', currentVersion, 'instead')
la(nextVersion === '1.0.0', 'Expected next version to be 1.0.0 but got', nextVersion, 'instead')
})
})
})