Files
cypress/__snapshots__/utils-spec.js
Gleb Bahmutov a9dcfdff31 Version in commit subject 563 (#564)
* start unit testing npm version extract

* put short NPM version into trigger commit subject, close #563

* pass appVeyor token to bumpercar
2017-10-05 14:13:11 +00:00

39 lines
911 B
JavaScript

exports['getJustVersion returns semver if passed 1'] = `
0.20.1
`
exports['getJustVersion returns semver with tag if passed 1'] = `
1.0.0-dev
`
exports['getJustVersion returns name if starts with cypress 1'] = `
cypress@dev
`
exports['getJustVersion returns name if starts with cypress 2'] = `
cypress@alpha
`
exports['getJustVersion returns name if starts with cypress 3'] = `
cypress@0.20.3
`
exports['getJustVersion returns name if matches cypress 1'] = `
cypress
`
exports['getJustVersion extracts version from url 1'] = {
"url": "https://foo.com/npm/0.20.3/develop-sha-13992/cypress.tgz",
"version": "0.20.3"
}
exports['getJustVersion extracts version with dev from url 1'] = {
"url": "https://foo.com/npm/0.20.3-dev/develop-sha-13992/cypress.tgz",
"version": "0.20.3-dev"
}
exports['getJustVersion for anything else returns the input 1'] = {
"url": "babababa",
"version": "babababa"
}