Skip to content

Commit 2e3536e

Browse files
authored
build action
1 parent 6401920 commit 2e3536e

File tree

4 files changed

+16071
-19
lines changed

4 files changed

+16071
-19
lines changed

__tests__/main.test.ts

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
import {wait} from '../src/wait'
2-
import * as process from 'process'
3-
import * as cp from 'child_process'
4-
import * as path from 'path'
1+
import { wait } from '../src/wait';
2+
import * as process from 'process';
3+
import * as cp from 'child_process';
4+
import * as path from 'path';
55

66
test('throws invalid number', async () => {
7-
const input = parseInt('foo', 10)
8-
await expect(wait(input)).rejects.toThrow('milliseconds not a number')
9-
})
7+
const input = parseInt('foo', 10);
8+
await expect(wait(input)).rejects.toThrow('milliseconds not a number');
9+
});
1010

1111
test('wait 500 ms', async () => {
12-
const start = new Date()
13-
await wait(500)
14-
const end = new Date()
15-
var delta = Math.abs(end.getTime() - start.getTime())
16-
expect(delta).toBeGreaterThan(450)
17-
})
12+
const start = new Date();
13+
await wait(500);
14+
const end = new Date();
15+
var delta = Math.abs(end.getTime() - start.getTime());
16+
expect(delta).toBeGreaterThan(450);
17+
});
1818

1919
// shows how the runner will run a javascript action with env / stdout protocol
2020
test('test runs', () => {
21-
process.env['INPUT_MILLISECONDS'] = '500'
22-
const ip = path.join(__dirname, '..', 'lib', 'main.js')
21+
process.env['INPUT_MILLISECONDS'] = '500';
22+
const ip = path.join(__dirname, '..', 'lib', 'main.js');
2323
const options: cp.ExecSyncOptions = {
24-
env: process.env
25-
}
26-
console.log(cp.execSync(`node ${ip}`, options).toString())
27-
})
24+
env: process.env,
25+
};
26+
console.log(cp.execSync(`node ${ip}`, options).toString());
27+
});

0 commit comments

Comments
 (0)