-
Notifications
You must be signed in to change notification settings - Fork 8
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
1 parent
0c20e94
commit 481d4cb
Showing
6 changed files
with
40 additions
and
63 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 |
---|---|---|
|
@@ -4,8 +4,3 @@ node_modules | |
*.log | ||
.DS_Store | ||
.nyc_output | ||
.test | ||
.tmp | ||
|
||
# build-artifacts | ||
dist |
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 |
---|---|---|
|
@@ -4,11 +4,7 @@ node_modules | |
*.log | ||
.DS_Store | ||
.nyc_output | ||
.test | ||
.tmp | ||
|
||
# source/config | ||
src | ||
test | ||
*.yml | ||
.gitignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
module.exports = class SemanticReleaseError extends Error { | ||
constructor (message, code) { | ||
super() | ||
this.message = message | ||
this.code = code | ||
} | ||
module.exports = SemanticReleaseError | ||
|
||
SemanticReleaseError.prototype = new Error() | ||
function SemanticReleaseError (message, code) { | ||
Error.captureStackTrace(this, this.constructor) | ||
this.name = this.constructor.name | ||
this.message = message | ||
this.code = code | ||
} |
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,28 @@ | ||
var test = require('tap').test | ||
|
||
var SemanticReleaseError = require('../') | ||
|
||
test('instanciates error', function (t) { | ||
var error = new SemanticReleaseError() | ||
|
||
t.ok(error instanceof Error) | ||
t.end() | ||
}) | ||
|
||
test('sets message', function (t) { | ||
var message = 'foo' | ||
var error = new SemanticReleaseError(message) | ||
|
||
t.is(error.message, message) | ||
t.end() | ||
}) | ||
|
||
test('sets message and code', function (t) { | ||
var code = 'ENOFOO' | ||
var message = 'bar' | ||
var error = new SemanticReleaseError(message, code) | ||
|
||
t.is(error.code, code) | ||
t.is(error.message, message) | ||
t.end() | ||
}) |
This file was deleted.
Oops, something went wrong.