feat(core): collect coverage for `index.ts` files
MODIFY
jest.config.js
jest.config.js
@@ -4,7 +4,7 @@ module.exports = {
},
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$',
coverageDirectory: './coverage/',
- coveragePathIgnorePatterns: ['spec-util.ts$', 'index.ts$', '.d.ts$'],
+ coveragePathIgnorePatterns: ['spec-util.ts$', '.d.ts$'],
collectCoverageFrom : ['packages/**/*.ts'],
moduleFileExtensions: [
'ts',

ADD
packages/core/src/index.spec.ts
+import * as API from './index';
+
+describe('@marblejs/core public API', () => {
+
+ it('apis should be defined', () => {
+ expect(API.matchPath).toBeDefined();
+ expect(API.matchType).toBeDefined();
+ expect(API.httpListener).toBeDefined();
+ expect(API.HttpError).toBeDefined();
+ expect(API.error$).toBeDefined();
+ expect(API.combineRoutes).toBeDefined();
+ });
+
+});

feat(core): collect coverage for `index.ts` files