Test cleanup and fixes [a-b]

This commit is contained in:
Angelos Chalaris
2018-06-18 15:54:48 +03:00
parent a78f5db260
commit 026c65a5e6
151 changed files with 753 additions and 373 deletions

View File

@ -8,11 +8,15 @@ const Blob = class{
};
const byteSize = str => new Blob([str]).size;
test('byteSize is a Function', () => {
test('byteSize is a Function', () => {
expect(byteSize).toBeInstanceOf(Function);
});
t.equal(byteSize('a'), 1, 'Works for a single letter');
t.equal(byteSize('Hello World'), 11, 'Works for a common string');
t.equal(byteSize('😀'), 4, 'Works for emoji');
test('Works for a single letter', () => {
expect(byteSize('a')).toBe(1);
});
test('Works for a common string', () => {
expect(byteSize('Hello World')).toBe(11);
});
test('Works for emoji', () => {
expect(byteSize('😀')).toBe(4);
});