1
1
import { ENGINE_HOOKS } from "../../presets" ;
2
2
import { runEngineTestV5 } from "../../engine" ;
3
- import { GithubImportPod , GithubPublishPod } from "@dendronhq/pods-core" ;
3
+ import {
4
+ GithubIssueImportPod ,
5
+ GithubIssuePublishPod ,
6
+ } from "@dendronhq/pods-core" ;
4
7
import { NoteProps , NoteUtils , VaultUtils } from "@dendronhq/common-all" ;
5
8
import _ from "lodash" ;
6
9
7
- describe ( "GithubPod import pod" , ( ) => {
10
+ describe ( "GithubIssuePod import pod" , ( ) => {
8
11
let result : any ;
9
12
let fname : string ;
10
13
beforeEach ( ( ) => {
@@ -21,6 +24,9 @@ describe("GithubPod import pod", () => {
21
24
number : 902 ,
22
25
state : "OPEN" ,
23
26
id : "sddsnjdek" ,
27
+ author : {
28
+ url : "https://github.com/xyzuser" ,
29
+ } ,
24
30
labels : {
25
31
edges : [
26
32
{
@@ -41,7 +47,7 @@ describe("GithubPod import pod", () => {
41
47
test ( "Import Issue with status: open" , async ( ) => {
42
48
await runEngineTestV5 (
43
49
async ( { engine, vaults, wsRoot } ) => {
44
- const pod = new GithubImportPod ( ) ;
50
+ const pod = new GithubIssueImportPod ( ) ;
45
51
const vaultName = VaultUtils . getName ( vaults [ 0 ] ) ;
46
52
47
53
pod . getDataFromGithub = jest . fn ( ) . mockReturnValue ( result ) ;
@@ -68,6 +74,7 @@ describe("GithubPod import pod", () => {
68
74
wsRoot,
69
75
} ) ;
70
76
expect ( note . custom . status ) . toEqual ( "OPEN" ) ;
77
+ expect ( note . custom . author ) . toEqual ( "https://github.com/xyzuser" ) ;
71
78
} ,
72
79
{
73
80
expect,
@@ -79,7 +86,7 @@ describe("GithubPod import pod", () => {
79
86
test ( "fname as id" , async ( ) => {
80
87
await runEngineTestV5 (
81
88
async ( { engine, vaults, wsRoot } ) => {
82
- const pod = new GithubImportPod ( ) ;
89
+ const pod = new GithubIssueImportPod ( ) ;
83
90
const vaultName = VaultUtils . getName ( vaults [ 0 ] ) ;
84
91
85
92
pod . getDataFromGithub = jest . fn ( ) . mockReturnValue ( result ) ;
@@ -117,7 +124,7 @@ describe("GithubPod import pod", () => {
117
124
test ( "with frontmatter" , async ( ) => {
118
125
await runEngineTestV5 (
119
126
async ( { engine, vaults, wsRoot } ) => {
120
- const pod = new GithubImportPod ( ) ;
127
+ const pod = new GithubIssueImportPod ( ) ;
121
128
const vaultName = VaultUtils . getName ( vaults [ 0 ] ) ;
122
129
123
130
pod . getDataFromGithub = jest . fn ( ) . mockReturnValue ( result ) ;
@@ -185,7 +192,7 @@ describe("github publish pod", () => {
185
192
test ( "basic" , async ( ) => {
186
193
await runEngineTestV5 (
187
194
async ( { engine, vaults, wsRoot } ) => {
188
- const pod = new GithubPublishPod ( ) ;
195
+ const pod = new GithubIssuePublishPod ( ) ;
189
196
const vaultName = VaultUtils . getName ( vaults [ 0 ] ) ;
190
197
pod . getLabelsFromGithub = jest
191
198
. fn ( )
@@ -214,7 +221,7 @@ describe("github publish pod", () => {
214
221
test ( "with invalid tags" , async ( ) => {
215
222
await runEngineTestV5 (
216
223
async ( { engine, vaults, wsRoot } ) => {
217
- const pod = new GithubPublishPod ( ) ;
224
+ const pod = new GithubIssuePublishPod ( ) ;
218
225
const vaultName = VaultUtils . getName ( vaults [ 0 ] ) ;
219
226
pod . getLabelsFromGithub = jest
220
227
. fn ( )
@@ -246,7 +253,7 @@ describe("github publish pod", () => {
246
253
test ( "create Issue" , async ( ) => {
247
254
await runEngineTestV5 (
248
255
async ( { engine, vaults, wsRoot } ) => {
249
- const pod = new GithubPublishPod ( ) ;
256
+ const pod = new GithubIssuePublishPod ( ) ;
250
257
const vaultName = VaultUtils . getName ( vaults [ 0 ] ) ;
251
258
pod . getLabelsFromGithub = jest
252
259
. fn ( )
0 commit comments