Skip to content

Commit 6b72548

Browse files
authoredOct 8, 2021
Replace simple-assert with a throw (#27)
1 parent fbd5eb5 commit 6b72548

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎package.json

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"mocha": "^3.1.2",
7575
"phantomjs-prebuilt": "^2.1.5",
7676
"semantic-release": "^4.3.5",
77-
"simple-assert": "^1.0.0",
7877
"travis-after-all": "^1.4.4",
7978
"validate-commit-msg": "^2.3.1"
8079
},

‎test/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
'use strict';
2-
var assert = require('simple-assert');
32
var getFuncName = require('..');
3+
function assert(expr, msg) {
4+
if (!expr) {
5+
throw new Error(msg || 'Assertion Failed');
6+
}
7+
}
8+
49
describe('getFuncName', function () {
510
it('should get the function name', function () {
611
function normalFunction() {

0 commit comments

Comments
 (0)
Please sign in to comment.