Skip to content

Commit

Permalink
Add more initial test files
Browse files Browse the repository at this point in the history
  • Loading branch information
eaviles committed Apr 29, 2019
1 parent 7c6d096 commit 93a29e2
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/records.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

const records = require('./records');

describe('lib/records', () => {
test('the module exports the expected', () => {
expect(records).toEqual({
getRecordsDecoder: expect.any(Function),
getRecordsEncoder: expect.any(Function),
RecordsDecoder: expect.any(Function)
});
const { RecordsDecoder } = records;
expect(RecordsDecoder).toThrow('Class constructor');
});
});
10 changes: 10 additions & 0 deletions lib/state-store.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

const StateStore = require('./state-store');

describe('lib/state-store', () => {
test('the module exports the expected', () => {
expect(StateStore).toEqual(expect.any(Function));
expect(StateStore).toThrow('Class constructor');
});
});
16 changes: 16 additions & 0 deletions lib/stats.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

const stats = require('./stats');

describe('lib/stats', () => {
test('the module exports the expected', () => {
expect(stats).toEqual({
getStats: expect.any(Function),
reportException: expect.any(Function),
reportRecordConsumed: expect.any(Function),
reportRecordSent: expect.any(Function),
reportSuccess: expect.any(Function),
startStatsEmitter: expect.any(Function)
});
});
});
12 changes: 12 additions & 0 deletions lib/table.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

const table = require('./table');

describe('lib/table', () => {
test('the module exports the expected', () => {
expect(table).toEqual({
confirmTableTags: expect.any(Function),
ensureTableExists: expect.any(Function)
});
});
});

0 comments on commit 93a29e2

Please sign in to comment.