This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
/
issue.test.ts
56 lines (46 loc) · 1.73 KB
/
issue.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* © 2013 Liferay, Inc. <https://liferay.com> and Node GH contributors
* (see file: README.md)
* SPDX-License-Identifier: BSD-3-Clause
*/
import { runCmd } from '../src/test-utils'
describe('E2E: Issues Module Test', () => {
it('List Issues `gh is`', done => {
expect(runCmd('gh is')).toMatchSnapshot()
done()
})
it(`Assign Issues \`gh is --assign -A ${process.env.GH_USER} --number 1\``, done => {
expect(runCmd(`gh is --assign -A ${process.env.GH_USER} --number 1`)).toMatchSnapshot()
done()
})
it('Open issue in browser `gh is 55 --browser`', done => {
expect(runCmd('gh is 55 --browser')).toMatchSnapshot()
done()
})
it('Create a new issue `gh is -N -t "Node GH rocks!" -m "msg" -L bug,question,test`', done => {
expect(
runCmd(`gh is -N -t "Node GH rocks!" -m "msg" -L bug,question,test`)
).toMatchSnapshot()
done()
})
it('Comment on Issues `gh is 1 -c "comment"`', done => {
expect(runCmd(`gh is 1 -c "comment"`)).toMatchSnapshot()
done()
})
it('Close Issue `gh is --close --number 7 --number 10`', done => {
expect(runCmd(`gh is --close --number 7 --number 10`)).toMatchSnapshot()
done()
})
it('Open Issue `gh is --open --number 7 --number 10`', done => {
expect(runCmd(`gh is --open --number 7 --number 10`)).toMatchSnapshot()
done()
})
it('Search Issues `gh is -s hi`', done => {
expect(runCmd(`gh is -s 'hi'`)).toMatchSnapshot()
done()
})
it('Lock issue in browser `gh is 138 --lock --lock-reason off-topic`', done => {
expect(runCmd('gh is 138 --lock --lock-reason off-topic')).toMatchSnapshot()
done()
})
})