Skip to content

Commit 00999c3

Browse files
committed
added tests file
1 parent c866e35 commit 00999c3

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ typings/
6464

6565
# next.js build output
6666
.next
67+
68+
lib/

__tests__/main.test.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// TODO make tests
2+
test('test', () => {
3+
expect(true).toEqual(true)
4+
})
5+
// import * as process from 'process'
6+
// import * as cp from 'child_process'
7+
// import * as path from 'path'
8+
//
9+
// test('throws invalid number', async () => {
10+
// const input = parseInt('foo', 10)
11+
// await expect(wait(input)).rejects.toThrow('milliseconds not a number')
12+
// })
13+
//
14+
// test('wait 500 ms', async () => {
15+
// const start = new Date()
16+
// await wait(500)
17+
// const end = new Date()
18+
// var delta = Math.abs(end.getTime() - start.getTime())
19+
// expect(delta).toBeGreaterThan(450)
20+
// })
21+
//
22+
// // shows how the runner will run a javascript action with env / stdout protocol
23+
// test('test runs', () => {
24+
// process.env['INPUT_MILLISECONDS'] = '500'
25+
// const ip = path.join(__dirname, '..', 'lib', 'main.js')
26+
// const options: cp.ExecSyncOptions = {
27+
// env: process.env
28+
// }
29+
// console.log(cp.execSync(`node ${ip}`, options).toString())
30+
// })

0 commit comments

Comments
 (0)