mise-action/__tests__/main.test.ts

15 lines
442 B
TypeScript
Raw Normal View History

2023-01-14 08:11:40 -06:00
import * as process from 'process'
import * as cp from 'child_process'
import * as path from 'path'
2023-01-14 08:36:43 -06:00
import {expect, test, jest} from '@jest/globals'
import {run} from '../src/main'
2023-02-20 22:28:04 -06:00
import {exec, getExecOutput} from '@actions/exec'
2023-01-14 08:11:40 -06:00
2023-01-14 08:36:43 -06:00
jest.mock('@actions/exec')
2023-01-14 08:11:40 -06:00
// shows how the runner will run a javascript action with env / stdout protocol
2023-02-20 22:28:04 -06:00
test.skip('install', async () => {
2023-01-14 08:36:43 -06:00
await run()
expect(exec).toBeCalledWith('rtx', ['install'])
2023-01-14 08:11:40 -06:00
})