Skip to content
Merged
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
56 changes: 28 additions & 28 deletions extension/src/cli/dvc/executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.add(cwd, relPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['add', relPath],
cwd,
env: mockedEnv,
Expand All @@ -98,7 +98,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.checkout(fsPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['checkout'],
cwd: fsPath,
env: mockedEnv,
Expand All @@ -114,7 +114,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.checkout(fsPath, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['checkout', '-f'],
cwd: fsPath,
env: mockedEnv,
Expand All @@ -133,7 +133,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.checkout(cwd, relPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['checkout', relPath],
cwd,
env: mockedEnv,
Expand All @@ -152,7 +152,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.checkout(cwd, relPath, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['checkout', relPath, '-f'],
cwd,
env: mockedEnv,
Expand All @@ -170,7 +170,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.commit(cwd)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['commit'],
cwd,
env: mockedEnv,
Expand All @@ -186,7 +186,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.commit(cwd, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['commit', '-f'],
cwd,
env: mockedEnv,
Expand All @@ -208,7 +208,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.commit(cwd, relPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['commit', relPath],
cwd,
env: mockedEnv,
Expand All @@ -230,7 +230,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.commit(cwd, relPath, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['commit', relPath, '-f'],
cwd,
env: mockedEnv,
Expand All @@ -248,7 +248,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.experimentApply(cwd, 'exp-test')
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'apply', 'exp-test'],
cwd,
env: mockedEnv,
Expand All @@ -273,7 +273,7 @@ describe('CliExecutor', () => {
)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'branch', 'exp-0898f', 'some-branch'],
cwd,
env: mockedEnv,
Expand All @@ -298,7 +298,7 @@ describe('CliExecutor', () => {
)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'gc', '-f', '--workspace', '--queued'],
cwd,
env: mockedEnv,
Expand All @@ -316,7 +316,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.experimentRemove(cwd, 'exp-dfd12')
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'remove', 'exp-dfd12'],
cwd,
env: mockedEnv,
Expand All @@ -334,7 +334,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.experimentRemoveQueue(cwd)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'remove', '--queue'],
cwd,
env: mockedEnv,
Expand All @@ -352,7 +352,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.experimentRunQueue(cwd)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'run', '--queue'],
cwd,
env: mockedEnv,
Expand Down Expand Up @@ -387,7 +387,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.init(fsPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['init', '--subdir'],
cwd: fsPath,
env: mockedEnv,
Expand All @@ -411,7 +411,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.move(cwd, target, destination)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['move', target, destination],
cwd,
env: mockedEnv,
Expand All @@ -430,7 +430,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.pull(cwd)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['pull'],
cwd,
env: mockedEnv,
Expand All @@ -447,7 +447,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.pull(cwd, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['pull', '-f'],
cwd,
env: mockedEnv,
Expand All @@ -465,7 +465,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.pull(cwd, relPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['pull', relPath],
cwd,
env: mockedEnv,
Expand All @@ -483,7 +483,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.pull(cwd, relPath, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['pull', relPath, '-f'],
cwd,
env: mockedEnv,
Expand All @@ -502,7 +502,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.push(cwd)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['push'],
cwd,
env: mockedEnv,
Expand All @@ -518,7 +518,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.push(cwd, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['push', '-f'],
cwd,
env: mockedEnv,
Expand All @@ -536,7 +536,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.push(cwd, relPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['push', relPath],
cwd,
env: mockedEnv,
Expand All @@ -554,7 +554,7 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.push(cwd, relPath, Flag.FORCE)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['push', relPath, '-f'],
cwd,
env: mockedEnv,
Expand All @@ -575,15 +575,15 @@ describe('CliExecutor', () => {
const output = await dvcExecutor.remove(cwd, relPath)
expect(output).toStrictEqual(stdout)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['remove', relPath],
cwd,
env: mockedEnv,
executable: 'dvc'
})

expect(mockedSetContextValue).toBeCalledTimes(2)
expect(mockedSetContextValue).toBeCalledWith(
expect(mockedSetContextValue).toHaveBeenCalledTimes(2)
expect(mockedSetContextValue).toHaveBeenCalledWith(
'dvc.scm.command.running',
true
)
Expand Down
4 changes: 2 additions & 2 deletions extension/src/cli/dvc/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('executeDvcProcess', () => {

await cli.executeDvcProcess(cwd, ...args)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args,
cwd,
env: { ...processEnv, DVCLIVE_OPEN: 'false', DVC_NO_ANALYTICS: 'true' },
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('executeDvcProcess', () => {

await expect(cli.executeDvcProcess(cwd, ...args)).rejects.toThrow()

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args,
cwd,
env: {
Expand Down
12 changes: 6 additions & 6 deletions extension/src/cli/dvc/reader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('CliReader', () => {

const cliOutput = await dvcReader.expShow(cwd)
expect(cliOutput).toStrictEqual(expShowFixture)
expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['exp', 'show', JSON_FLAG],
cwd,
env: mockedEnv,
Expand Down Expand Up @@ -132,7 +132,7 @@ describe('CliReader', () => {

expect(statusOutput).toStrictEqual(cliOutput)

expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['data', 'status', '--granular', '--unchanged', JSON_FLAG],
cwd,
env: mockedEnv,
Expand All @@ -159,7 +159,7 @@ describe('CliReader', () => {

const plots = await dvcReader.plotsDiff(cwd, 'HEAD')
expect(plots).toStrictEqual(plotsDiffFixture)
expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: [
'plots',
'diff',
Expand All @@ -183,7 +183,7 @@ describe('CliReader', () => {
mockedCreateProcess.mockReturnValueOnce(getMockedProcess(stdout))
const relativeRoot = await dvcReader.root(cwd)
expect(relativeRoot).toStrictEqual(stdout)
expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['root'],
cwd,
env: mockedEnv,
Expand All @@ -201,7 +201,7 @@ describe('CliReader', () => {

const relativeRoot = await dvcReader.root(cwd)
expect(relativeRoot).toBeUndefined()
expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['root'],
cwd,
env: mockedEnv,
Expand All @@ -218,7 +218,7 @@ describe('CliReader', () => {
const output = await dvcReader.version(cwd)

expect(output).toStrictEqual(stdout)
expect(mockedCreateProcess).toBeCalledWith({
expect(mockedCreateProcess).toHaveBeenCalledWith({
args: ['--version'],
cwd,
env: mockedEnv,
Expand Down
Loading