mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Moving many nodeunit tests to jasmine
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
var defaults = require('../../lib/defaults');
|
||||
|
||||
describe('defaults', function () {
|
||||
it('should transform request json', function () {
|
||||
expect(defaults.transformRequest[0]({foo: 'bar'})).toEqual('{"foo":"bar"}');
|
||||
});
|
||||
|
||||
it('should do nothing to request string', function () {
|
||||
expect(defaults.transformRequest[0]('foo=bar')).toEqual('foo=bar');
|
||||
});
|
||||
|
||||
it('should transform response json', function () {
|
||||
var data = defaults.transformResponse[0]('{"foo":"bar"}');
|
||||
|
||||
expect(typeof data).toEqual('object');
|
||||
expect(data.foo).toEqual('bar');
|
||||
});
|
||||
|
||||
it('should do nothing to response string', function () {
|
||||
expect(defaults.transformResponse[0]('foo=bar')).toEqual('foo=bar');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user