mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-04-16 08:45:44 +00:00
wip: replace jest with vitest
This commit is contained in:
parent
b379e88781
commit
fcac78057e
22 changed files with 2182 additions and 78 deletions
|
|
@ -1,5 +1,7 @@
|
|||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
import { vi, describe, test, expect } from 'vitest';
|
||||
|
||||
vi.mock('@actions/core');
|
||||
vi.mock('@actions/core/lib/command');
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import got from 'got';
|
||||
|
|
@ -41,7 +43,7 @@ describe('integration', () => {
|
|||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
vi.resetAllMocks();
|
||||
|
||||
when(core.getInput)
|
||||
.calledWith('url', expect.anything())
|
||||
|
|
@ -238,7 +240,7 @@ describe('authenticate with approle', () => {
|
|||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
vi.resetAllMocks();
|
||||
|
||||
when(core.getInput)
|
||||
.calledWith('method', expect.anything())
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
module.exports = {
|
||||
verbose: true
|
||||
};
|
||||
8
integrationTests/enterprise/vitest.config.js
Normal file
8
integrationTests/enterprise/vitest.config.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// required to make jest-when work with vitest
|
||||
globals: true,
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue