First upload version 0.0.1
This commit is contained in:
25
node_modules/universal-github-app-jwt/index.test-d.ts
generated
vendored
Normal file
25
node_modules/universal-github-app-jwt/index.test-d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { expectType } from "tsd";
|
||||
import githubAppJwt from ".";
|
||||
|
||||
export async function test() {
|
||||
const result = await githubAppJwt({
|
||||
id: 123,
|
||||
privateKey: "",
|
||||
});
|
||||
|
||||
expectType<number>(result.appId);
|
||||
expectType<number>(result.expiration);
|
||||
expectType<string>(result.token);
|
||||
}
|
||||
|
||||
// Test case to verify `id` can be set to a string
|
||||
export async function testWithStringId() {
|
||||
const resultWithStringId = await githubAppJwt({
|
||||
id: "client_id_string",
|
||||
privateKey: "",
|
||||
});
|
||||
|
||||
expectType<string>(resultWithStringId.appId);
|
||||
expectType<number>(resultWithStringId.expiration);
|
||||
expectType<string>(resultWithStringId.token);
|
||||
}
|
||||
Reference in New Issue
Block a user