Add working Jest & TypeScript config
- Jest now uses ts-jest for transforms - TypeScript compilation via `lerna run tsc`
This commit is contained in:
1 parent
7d29a743f6
commit
ecd9a32a56
6 files changed
+23
-17
No files matched your search
@@ -1,9 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// const github = require('..');
|
|
||||||
|
|
||||||
describe('@actions/github', () => {
|
|
||||||
it('needs tests', () => {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { github } from '../src/github';
|
||||||
|
|
||||||
|
describe('@actions/github', () => {
|
||||||
|
it('needs tests', () => {
|
||||||
|
expect(github()).toBe(true)
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = github;
|
|
||||||
|
|
||||||
function github() {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
+2
-1
@@ -24,7 +24,8 @@
|
|||||||
"url": "git+https://github.com/actions/toolkit.git"
|
"url": "git+https://github.com/actions/toolkit.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||||
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function github() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./",
|
||||||
|
"outDir": "./lib",
|
||||||
|
"rootDir": "./src"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"./src"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in new issue
Block a user