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
Showing
5 changed files
with
55 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,6 @@ script: | |
- npm run test | ||
|
||
after_success: | ||
- npm run coverage:upload | ||
- npm run codecov | ||
- npm run semantic-release | ||
|
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 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 test from 'ava'; | ||
import SemanticReleaseError from '../index'; | ||
|
||
test('Instanciates error', t => { | ||
const error = new SemanticReleaseError(); | ||
|
||
t.true(error instanceof Error); | ||
}); | ||
|
||
test('Sets message', t => { | ||
const message = 'foo'; | ||
const error = new SemanticReleaseError(message); | ||
|
||
t.is(error.message, message); | ||
}); | ||
|
||
test('Sets message and code', function(t) { | ||
const code = 'ENOFOO'; | ||
const message = 'bar'; | ||
const error = new SemanticReleaseError(message, code); | ||
|
||
t.is(error.code, code); | ||
t.is(error.message, message); | ||
}); |