Fix formatting, whitespace, markdownlint (#9) (#40)

Co-authored-by: Frieder Bluemle <frieder.bluemle@gmail.com>
This commit is contained in:
Ross Brodbeck
2020-07-20 07:08:15 -04:00
committed by GitHub
parent b447b178e1
commit c0941600fa
12 changed files with 55 additions and 56 deletions

View File

@@ -3,21 +3,21 @@ const process = require('process');
const cp = require('child_process');
const path = require('path');
test('throws invalid number', async() => {
await expect(wait('foo')).rejects.toThrow('milleseconds not a number');
test('throws invalid number', async () => {
await expect(wait('foo')).rejects.toThrow('milliseconds not a number');
});
test('wait 500 ms', async() => {
const start = new Date();
await wait(500);
const end = new Date();
var delta = Math.abs(end - start);
expect(delta).toBeGreaterThan(450);
test('wait 500 ms', async () => {
const start = new Date();
await wait(500);
const end = new Date();
var delta = Math.abs(end - start);
expect(delta).toBeGreaterThan(450);
});
// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
process.env['INPUT_MILLISECONDS'] = 500;
const ip = path.join(__dirname, 'index.js');
console.log(cp.execSync(`node ${ip}`, { env: process.env }).toString());
process.env['INPUT_MILLISECONDS'] = 500;
const ip = path.join(__dirname, 'index.js');
console.log(cp.execSync(`node ${ip}`, {env: process.env}).toString());
})