This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update-winget: implement update action
- Loading branch information
1 parent
42f7e2a
commit 67c495c
Showing
14 changed files
with
62,153 additions
and
7,848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[*.ts] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,5 @@ | ||
import {wait} from '../src/wait' | ||
import * as process from 'process' | ||
import * as cp from 'child_process' | ||
import * as path from 'path' | ||
//import * as process from 'process'; | ||
//import * as cp from 'child_process'; | ||
//import * as path from 'path'; | ||
|
||
test('throws invalid number', async () => { | ||
const input = parseInt('foo', 10) | ||
await expect(wait(input)).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.getTime() - start.getTime()) | ||
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, '..', 'lib', 'main.js') | ||
const options: cp.ExecSyncOptions = { | ||
env: process.env | ||
} | ||
console.log(cp.execSync(`node ${ip}`, options).toString()) | ||
}) | ||
test('always true', async () => {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.