tests ES6 refactoring, tests update, + common.js tests
This commit is contained in:
1 parent
ae11dc5235
commit
766105afac
6 files changed
+58
-43
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import should from 'should';
|
||||
import {query} from '../../src/utils/net';
|
||||
|
||||
describe('utils', () => {
|
||||
describe('net.js', () => {
|
||||
describe('query', () => {
|
||||
let sample = [['count', 10], ['portion', 5], ['hello', 'lol']];
|
||||
|
||||
it('should combine query params', () => {
|
||||
let params = query(sample);
|
||||
params.should.be.equal('count=10&portion=5&hello=lol');
|
||||
});
|
||||
|
||||
it('should return string', () => {
|
||||
let params = query(sample);
|
||||
|
||||
params.should.be.type('string');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user