mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-05-04 03:08:03 +08:00
Add working Jest & TypeScript config
- Jest now uses ts-jest for transforms - TypeScript compilation via `lerna run tsc`
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
// const github = require('..');
|
||||
|
||||
describe('@actions/github', () => {
|
||||
it('needs tests', () => {
|
||||
|
||||
});
|
||||
});
|
||||
7
packages/github/__tests__/github.test.ts
Normal file
7
packages/github/__tests__/github.test.ts
Normal file
@@ -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
|
||||
}
|
||||
@@ -24,7 +24,8 @@
|
||||
"url": "git+https://github.com/actions/toolkit.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||
"tsc": "tsc"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
|
||||
3
packages/github/src/github.ts
Normal file
3
packages/github/src/github.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export function github() {
|
||||
return true
|
||||
}
|
||||
11
packages/github/tsconfig.json
Normal file
11
packages/github/tsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./lib",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user