{"size": 911, "ext": "js", "max_stars_repo_path": "test/es6.js", "max_stars_repo_name": "SangBaek-VIRNECT/js-base64", "max_stars_repo_stars_event_min_datetime": "2015-01-04T02:45:11.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T07:16:27.000Z", "max_issues_repo_path": "test/es6.js", "max_issues_repo_name": "SangBaek-VIRNECT/js-base64", "max_issues_repo_issues_event_min_datetime": "2015-01-12T03:07:56.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-18T08:28:49.000Z", "max_forks_repo_path": "test/es6.js", "max_forks_repo_name": "SangBaek-VIRNECT/js-base64", "max_forks_repo_forks_event_min_datetime": "2015-01-03T21:44:23.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-30T02:35:38.000Z"}
{"max_stars_count": 3506, "max_issues_count": 127, "max_forks_count": 1601, "avg_line_length": 29.3870967742, "max_line_length": 64, "alphanum_fraction": 0.6520307355}
/*
 * $Id: es6.js,v 0.1 2017/11/29 21:43:17 ufolux Exp ufolux $
 *
 * use mocha to test me
 * http://visionmedia.github.com/mocha/
 */
// import {Base64} from '../base64.mjs'
import { extendString } from '../base64.mjs'

var assert = assert || require("assert");
var is = function (a, e, m) {
    return function () {
        assert.equal(a, e, m)
    }
};

delete String.prototype.fromBase64;
delete String.prototype.toBase64;
delete String.prototype.toBase64URI;
delete String.prototype.toBase64URL;
delete String.prototype.toUint8Array;
extendString();

describe('ES6 String', function () {
    it('.toBase64', is('小飼弾'.toBase64(), '5bCP6aO85by+'));
    it('.toBase64', is('小飼弾'.toBase64(true), '5bCP6aO85by-'));
    it('.toBase64URI', is('小飼弾'.toBase64URI(), '5bCP6aO85by-'));
    it('.fromBase64', is('5bCP6aO85by+'.fromBase64(), '小飼弾'));
    it('.fromBase64', is('5bCP6aO85by-'.fromBase64(), '小飼弾'));
});
