smartstring/test/test.base64.ts

17 lines
654 B
TypeScript
Raw Normal View History

import * as smartstring from '../ts/index';
import { tap, expect } from '@pushrocks/tapbundle';
2017-10-05 13:55:59 +00:00
// Base64
let testBase64: smartstring.Base64;
2017-10-05 13:55:59 +00:00
tap.test('expect create a valid instance of Base64', async () => {
testBase64 = new smartstring.Base64('somestring', 'string');
expect(testBase64).be.instanceOf(smartstring.Base64);
});
2017-10-05 13:55:59 +00:00
tap.test('expect read output a file as base64 and base64uri', async () => {
expect(testBase64.base64String).not.equal(testBase64.base64UriString);
let testBase64_2 = new smartstring.Base64(testBase64.base64UriString, 'base64uri');
expect(testBase64_2.simpleString).equal(testBase64.simpleString);
});
2017-10-05 13:55:59 +00:00
tap.start();