mirror of
https://github.com/axios/axios.git
synced 2026-04-13 02:51:56 +08:00
* Fixed bug #4727; Added node 18.x to the CI; Added hotfix for `ERR_OSSL_EVP_UNSUPPORTED` issue with karma running on node >=17.x; Added `cross-env` to allow running build and test scripts on Windows platforms; * Added conditional setting of `--openssl-legacy-provider` option for node versions >=17.x; * Refactored ssl-hotfix & test script; * Fixed and refactored default max body length test due to ECONNRESET failure; * Added test for converting the data uri to a Blob; Fixed bug with parsing mime type for Blob; Co-authored-by: Jay <jasonsaayman@gmail.com>
13 lines
404 B
JavaScript
13 lines
404 B
JavaScript
var assert = require('assert');
|
|
var fromDataURI = require('../../../lib/helpers/fromDataURI');
|
|
|
|
describe('helpers::fromDataURI', function () {
|
|
it('should return buffer from data uri', function () {
|
|
const buffer= Buffer.from('123');
|
|
|
|
const dataURI = 'data:application/octet-stream;base64,' + buffer.toString('base64');
|
|
|
|
assert.deepStrictEqual(fromDataURI(dataURI, false), buffer);
|
|
});
|
|
});
|