Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency eslint-plugin-jest to v25.2.4 #15

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 80,
"printWidth": 180,
"tabWidth": 2,
"useTabs": false,
"semi": false,
Expand Down
30 changes: 2 additions & 28 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
import {wait} from '../src/wait'
import * as process from 'process'
import * as cp from 'child_process'
import * as path from 'path'
import {expect, test} from '@jest/globals'
import {test} from '@jest/globals'

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 np = process.execPath
const ip = path.join(__dirname, '..', 'lib', 'main.js')
const options: cp.ExecFileSyncOptions = {
env: process.env
}
console.log(cp.execFileSync(np, [ip], options).toString())
})
test('test runs', () => {})
44 changes: 38 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
name: 'Your name here'
description: 'Provide a description here'
author: 'Your name or organization here'
name: 'Taro React Native Release'
description: 'Taro React Native Release'
author: 'Tony Chen'
inputs:
milliseconds: # change this
token:
required: true
description: 'input description here'
default: 'default value if applicable'
description: 'github token'
publicpath:
required: false
description: 'asset public path'
default: 'https://cdn.jsdelivr.net/gh'
tag:
required: false
description: 'tag name'
iosbundlepath:
required: false
description: 'ios bundle path'
default: 'ios/main.js'
iosqrpath:
required: false
description: 'ios qr path'
default: 'release/qrcode/ios.png'
androidbundlepath:
required: false
description: 'android bundle path'
default: 'android/main.js'
androidqrpath:
required: false
description: 'android qr path'
default: 'release/qrcode/android.png'
appname:
required: false
description: 'app name'
logo:
required: false
description: 'app logo'
releaseprefix:
required: false
description: 'release markdown prefix'
default: 'Use [Taro Playground App](https://github.com/wuba/taro-playground) to scan the following qr codes:'
runs:
using: 'node12'
main: 'dist/index.js'
Loading