sign.test.js
394 Bytes
/**
* 签名类测试
*
* @author: jiangfeng<jeff.jiang@yoho.cn>
* @date: 2016/05/17
*/
const test = require('ava');
const sign = require('../../library/sign');
test('app sign test', t => {
let params = {
client_type: 'h5', // eslint-disable-line
a: 1,
b: 'b'
};
let signedParams = sign.apiSign(params);
t.true(sign.checkSign(signedParams));
});