diff --git a/package.json b/package.json index 8aeb84c6..6f5df0f0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Official AfricasTalking node.js API wrapper", "main": "index.js", "scripts": { - "test": "nyc mocha ./test", + "test": "nyc mocha ./test --exit --recursive", "test-windows": "nyc node_modules/mocha/bin/_mocha ./test" }, "repository": { diff --git a/test/fixtures.js b/test/fixtures.js index 712135a9..89fd2fd6 100644 --- a/test/fixtures.js +++ b/test/fixtures.js @@ -1,8 +1,8 @@ 'use strict'; exports.TEST_ACCOUNT = { - apiKey: 'YOUR_API_KEY', - username: 'YOUR_USERNAME', + apiKey: '', + username: 'sandbox', format: 'json', }; -exports.phoneNumber = '+2547xxxxxxxx'; +exports.phoneNumber = '+2547XXXXXXXX'; diff --git a/test/sms.js b/test/sms.js index e2a45ba2..3e2b0c21 100644 --- a/test/sms.js +++ b/test/sms.js @@ -206,7 +206,8 @@ describe('SMS', function () { const count = 1000; const numbers = Array(count) .fill(0) - .map((num, idx) => `+254000${count + idx}`); + .map((num, idx) => `+2547000${count + idx}00`.substring(0, 13)); + const opts = { to: numbers, message: 'This is heavy single test', @@ -219,7 +220,7 @@ describe('SMS', function () { done(); }) .catch(function (err) { - done(error); + done(err); }); });