mirror of
https://gitea.com/actions/setup-java.git
synced 2025-04-06 23:39:37 +00:00
Add and configure ESLint and update configuration for Prettier (#458)
* Add ESLint config and update Prettier * Update test files * Rebuild action * Update docs * Update licenses * Update tsconfig * Rebuild action * Update tsconfig.json * Fix console.time calls * Rebuild action * Rebuild action on Linux
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import path = require('path');
|
||||
import io = require('@actions/io');
|
||||
import exec = require('@actions/exec');
|
||||
import * as path from 'path';
|
||||
import * as io from '@actions/io';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as gpg from '../src/gpg';
|
||||
|
||||
jest.mock('@actions/exec', () => {
|
||||
return {
|
||||
@ -11,8 +12,6 @@ jest.mock('@actions/exec', () => {
|
||||
const tempDir = path.join(__dirname, 'runner', 'temp');
|
||||
process.env['RUNNER_TEMP'] = tempDir;
|
||||
|
||||
import gpg = require('../src/gpg');
|
||||
|
||||
describe('gpg tests', () => {
|
||||
beforeEach(async () => {
|
||||
await io.mkdirP(tempDir);
|
||||
@ -33,7 +32,11 @@ describe('gpg tests', () => {
|
||||
|
||||
expect(keyId).toBeNull();
|
||||
|
||||
expect(exec.exec).toHaveBeenCalledWith('gpg', expect.anything(), expect.anything());
|
||||
expect(exec.exec).toHaveBeenCalledWith(
|
||||
'gpg',
|
||||
expect.anything(),
|
||||
expect.anything()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -42,7 +45,11 @@ describe('gpg tests', () => {
|
||||
const keyId = 'asdfhjkl';
|
||||
await gpg.deleteKey(keyId);
|
||||
|
||||
expect(exec.exec).toHaveBeenCalledWith('gpg', expect.anything(), expect.anything());
|
||||
expect(exec.exec).toHaveBeenCalledWith(
|
||||
'gpg',
|
||||
expect.anything(),
|
||||
expect.anything()
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user