-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update blocked ESM only packages (execa, process-exists)
- Loading branch information
1 parent
3a60200
commit fd91f06
Showing
18 changed files
with
162 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { join, resolve } = require('path') | ||
require('../dist/vscode/mockModule') | ||
|
||
const importModuleAfterMockingVsCode = async () => { | ||
const { setupTestVenv } = require('../dist/python') | ||
return setupTestVenv | ||
} | ||
|
||
importModuleAfterMockingVsCode().then(setupTestVenv => { | ||
const cwd = resolve(__dirname, '..', '..', 'demo') | ||
|
||
setupTestVenv(cwd, '.env', '-r', join('.', 'requirements.txt')) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import process from 'process' | ||
import { describe, it, suite } from 'mocha' | ||
import { expect } from 'chai' | ||
import { executeProcess, processExists } from '../../../process/execution' | ||
|
||
suite('Process Manager Test Suite', () => { | ||
describe('executeProcess', () => { | ||
it('should be able to run a process', async () => { | ||
const output = await executeProcess({ | ||
args: ['some', 'text'], | ||
cwd: __dirname, | ||
executable: 'echo' | ||
}) | ||
expect(output).to.match(/some.*text/) | ||
}) | ||
|
||
it('should return the stderr if the process throws with stderr', async () => { | ||
await expect( | ||
executeProcess({ | ||
args: ['me', 'outside'], | ||
cwd: __dirname, | ||
executable: 'find' | ||
}) | ||
).to.be.eventually.rejected | ||
}) | ||
}) | ||
|
||
describe('processExists', () => { | ||
it('should return true if the process exists', async () => { | ||
expect(await processExists(process.pid)).to.be.true | ||
}) | ||
it('should return false if it does not', async () => { | ||
expect(await processExists(-123.321)).to.be.false | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.