Browse Source

Get rid of redundant type.js tests and inclide them in each method testfile

codec
Luke Childs 8 years ago
parent
commit
2cb8252f69
  1. 4
      test/b64.decode.js
  2. 4
      test/b64.encode.js
  3. 4
      test/b64.js
  4. 10
      test/types.js

4
test/b64.decode.js

@ -2,6 +2,10 @@ import test from 'ava';
import b64 from '../';
import values from './fixtures/values';
test('b64.decode is a function', t => {
t.is(typeof b64.decode, 'function');
});
test('b64.decode returns a Promise', t => {
const returnValue = b64.decode(values.string);
t.true(returnValue instanceof Promise);

4
test/b64.encode.js

@ -2,6 +2,10 @@ import test from 'ava';
import b64 from '../';
import values from './fixtures/values';
test('b64.encode is a function', t => {
t.is(typeof b64.encode, 'function');
});
test('b64.encode returns a Promise', t => {
const returnValue = b64.encode(values.buffer);
t.true(returnValue instanceof Promise);

4
test/b64.js

@ -2,6 +2,10 @@ import test from 'ava';
import b64 from '../';
import values from './fixtures/values';
test('b64 is a function', t => {
t.is(typeof b64, 'function');
});
test('b64 calls b64[opts.method]', async t => {
const encodeResult = await b64(values.buffer, { method: 'encode' });
const decodeResult = await b64(values.base64, { method: 'decode' });

10
test/types.js

@ -1,10 +0,0 @@
import test from 'ava';
import b64 from '../';
test('b64 is a function', t => {
t.is(typeof b64, 'function');
});
test('b64.encode is a function', t => {
t.is(typeof b64.encode, 'function');
});
Loading…
Cancel
Save