mirror of
https://github.com/actions/checkout.git
synced 2025-03-31 05:20:06 +02:00
feat: updated test for sparse-checkout
This commit is contained in:
parent
5bd25a5859
commit
d963058cca
3 changed files with 4 additions and 0 deletions
|
@ -727,6 +727,7 @@ async function setup(testName: string): Promise<void> {
|
||||||
branchDelete: jest.fn(),
|
branchDelete: jest.fn(),
|
||||||
branchExists: jest.fn(),
|
branchExists: jest.fn(),
|
||||||
branchList: jest.fn(),
|
branchList: jest.fn(),
|
||||||
|
sparseCheckout: jest.fn(),
|
||||||
checkout: jest.fn(),
|
checkout: jest.fn(),
|
||||||
checkoutDetach: jest.fn(),
|
checkoutDetach: jest.fn(),
|
||||||
config: jest.fn(
|
config: jest.fn(
|
||||||
|
@ -800,6 +801,7 @@ async function setup(testName: string): Promise<void> {
|
||||||
authToken: 'some auth token',
|
authToken: 'some auth token',
|
||||||
clean: true,
|
clean: true,
|
||||||
commit: '',
|
commit: '',
|
||||||
|
sparseCheckout: [],
|
||||||
fetchDepth: 1,
|
fetchDepth: 1,
|
||||||
lfs: false,
|
lfs: false,
|
||||||
submodules: false,
|
submodules: false,
|
||||||
|
|
|
@ -462,6 +462,7 @@ async function setup(testName: string): Promise<void> {
|
||||||
branchList: jest.fn(async () => {
|
branchList: jest.fn(async () => {
|
||||||
return []
|
return []
|
||||||
}),
|
}),
|
||||||
|
sparseCheckout: jest.fn(),
|
||||||
checkout: jest.fn(),
|
checkout: jest.fn(),
|
||||||
checkoutDetach: jest.fn(),
|
checkoutDetach: jest.fn(),
|
||||||
config: jest.fn(),
|
config: jest.fn(),
|
||||||
|
|
|
@ -79,6 +79,7 @@ describe('input-helper tests', () => {
|
||||||
expect(settings.clean).toBe(true)
|
expect(settings.clean).toBe(true)
|
||||||
expect(settings.commit).toBeTruthy()
|
expect(settings.commit).toBeTruthy()
|
||||||
expect(settings.commit).toBe('1234567890123456789012345678901234567890')
|
expect(settings.commit).toBe('1234567890123456789012345678901234567890')
|
||||||
|
expect(settings.sparseCheckout).toBe(undefined)
|
||||||
expect(settings.fetchDepth).toBe(1)
|
expect(settings.fetchDepth).toBe(1)
|
||||||
expect(settings.lfs).toBe(false)
|
expect(settings.lfs).toBe(false)
|
||||||
expect(settings.ref).toBe('refs/heads/some-ref')
|
expect(settings.ref).toBe('refs/heads/some-ref')
|
||||||
|
|
Loading…
Add table
Reference in a new issue