Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
chore(): added config spec and jest.
Browse files Browse the repository at this point in the history
  • Loading branch information
jthoms1 committed Dec 16, 2016
1 parent b68e125 commit fd990ed
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
13 changes: 12 additions & 1 deletion package.json
Expand Up @@ -88,6 +88,7 @@
"github": "0.2.4",
"ionic-cz-conventional-changelog": "1.0.0",
"jasmine": "2.5.2",
"jest": "^17.0.3",
"mock-fs": "3.11.0",
"node-sass": "3.10.1",
"rewire": "^2.5.2",
Expand Down Expand Up @@ -118,5 +119,15 @@
"path": "node_modules/ionic-cz-conventional-changelog"
}
},
"typings": "dist/index.d.ts"
"typings": "dist/index.d.ts",
"jest": {
"moduleFileExtensions": [
"ts",
"js"
],
"transform": {
"^.+\\.(ts)$": "<rootDir>/preprocessor.js"
},
"testRegex": "/src/.*\\.spec\\.(ts|js)$"
}
}
16 changes: 16 additions & 0 deletions preprocessor.js
@@ -0,0 +1,16 @@
const tsc = require('typescript');
const tsConfig = require('./tsconfig.json');

module.exports = {
process(src, path) {
if (path.endsWith('.ts')) {
return tsc.transpile(
src,
tsConfig.compilerOptions,
path,
[]
);
}
return src;
},
};
2 changes: 1 addition & 1 deletion src/clean.spec.ts
Expand Up @@ -37,4 +37,4 @@ describe('clean task', () => {
done();
});
});
});
});

0 comments on commit fd990ed

Please sign in to comment.