Skip to content

Commit c1a254c

Browse files
prescottpruelaurenzlong
authored andcommitted
Start tests for index exports (#5)
1 parent def2a27 commit c1a254c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

spec/index.spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,34 @@ import 'mocha';
2424
import './lifecycle.spec';
2525
import './main.spec';
2626
import './app.spec';
27+
import { expect } from 'chai';
28+
29+
/* tslint:disable-next-line:no-var-requires */
30+
const indexExport = require('../src')();
31+
32+
describe('index', () => {
33+
after(() => {
34+
// Call cleanup (handles case of cleanup function not existing)
35+
indexExport.cleanup && indexExport.cleanup();
36+
});
37+
38+
it('should export wrap as a function', () => {
39+
expect(indexExport.wrap).to.be.an('function');
40+
});
41+
42+
it('should export makeChange as a function', () => {
43+
expect(indexExport.makeChange).to.be.an('function');
44+
});
45+
46+
it('should export mockConfig as a function', () => {
47+
expect(indexExport.mockConfig).to.be.an('function');
48+
});
49+
50+
it('should export cleanup as a function', () => {
51+
expect(indexExport.cleanup).to.be.an('function');
52+
});
53+
});
54+
2755
// import './providers/analytics.spec';
2856
// import './providers/auth.spec';
2957
// import './providers/database.spec';

0 commit comments

Comments
 (0)