added tests

This commit is contained in:
Dolan
2016-12-06 16:45:25 +00:00
parent 100752ac63
commit 11e3fea84f
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
import * as base64 from 'base-64';
import * as utf8 from 'utf8';
let text = 'foo © bar 𝌆 baz';
let bytes = utf8.encode(text);
let encoded = base64.encode(bytes);
// → 'Zm9vIMKpIGJhciDwnYyGIGJheg=='
encoded = 'Zm9vIMKpIGJhciDwnYyGIGJheg==';
bytes = base64.decode(encoded);
text = utf8.decode(bytes);
+2 -1
View File
@@ -13,6 +13,7 @@
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts"
"index.d.ts",
"base-64-tests.ts"
]
}