Skip to content

Commit

Permalink
bug fix: 更正alicloudMns对象名
Browse files Browse the repository at this point in the history
版本更新为1.0.2
  • Loading branch information
jerryhu committed Jan 23, 2019
1 parent c661eb4 commit b48e5f3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules
test/fixtures/apps/alicloud-mns-test/logs
test/fixtures/apps/alicloud-mns-test/run
package-lock.json
logs
run
6 changes: 3 additions & 3 deletions lib/mns.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const assert = require('assert');
const alicloudMns = require('@alicloud/mns');
const MNS = require('@alicloud/mns');

module.exports = app => {
app.addSingleton('alicloud-mns', createClient);
app.addSingleton('alicloudMns', createClient);
};

function createClient(config) {
Expand All @@ -24,7 +24,7 @@ function createClient(config) {
vpc = false;
}

return new alicloudMns(config.accountId, {
return new MNS(config.accountId, {
region: config.region,
accessKeyId: config.accessKeyId,
accessKeySecret: config.secretAccessKey,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "egg-alicloud-mns",
"version": "1.0.1",
"version": "1.0.2",
"description": "Alicloud MNS plugin for egg",
"eggPlugin": {
"name": "alicloudMns"
Expand Down
5 changes: 5 additions & 0 deletions test/alicloud-mns.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const mock = require('egg-mock');
const assert = require('power-assert');

describe('test/alicloud-mns.test.js', () => {
let app;
Expand All @@ -20,4 +21,8 @@ describe('test/alicloud-mns.test.js', () => {
.expect('hi, alicloudMns')
.expect(200);
});

it('should get object app.alicloudMns', () => {
assert(app.alicloudMns);
});
});

0 comments on commit b48e5f3

Please sign in to comment.