-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test: Add test for devtool debug build option
- Loading branch information
1 parent
30391a0
commit 3fdc528
Showing
1 changed file
with
9 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,14 @@ import type childProcess from 'child_process' | |
import { BitbakeWorkspace } from '../../../ui/BitbakeWorkspace' | ||
import { BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner' | ||
import { BitbakeDriver } from '../../../driver/BitbakeDriver' | ||
import { registerDevtoolCommands } from '../../../ui/BitbakeCommands' | ||
import { addDevtoolDebugBuild, registerDevtoolCommands } from '../../../ui/BitbakeCommands' | ||
import { clientNotificationManager } from '../../../ui/ClientNotificationManager' | ||
import * as BitbakeTerminal from '../../../ui/BitbakeTerminal' | ||
import * as ProcessUtils from '../../../utils/ProcessUtils' | ||
import { LanguageClient } from 'vscode-languageclient/node' | ||
import { IPty } from 'node-pty' | ||
import { BitbakeScanResult } from '../../../lib/src/types/BitbakeScanResult' | ||
import { BitbakeSettings } from '../../../lib/src/BitbakeSettings' | ||
|
||
jest.mock('vscode') | ||
|
||
|
@@ -87,4 +88,11 @@ describe('Devtool ide-sdk command', () => { | |
await ideSDKCommand('busybox') | ||
expect(commandSpy).toHaveBeenCalledWith(expect.anything(), 'devtool ide-sdk -i code busybox core-image-minimal -t [email protected]', expect.anything()) | ||
}) | ||
|
||
it('should properly detect devtool modify options', async () => { | ||
// Test addDevtoolDebugBuild | ||
expect(addDevtoolDebugBuild('', {_bitbakeVersion: '3.0.0'} as BitbakeScanResult, {disableDevtoolDebugBuild: false} as BitbakeSettings)).toBe(' --debug-build') | ||
expect(addDevtoolDebugBuild('', {_bitbakeVersion: '3.0.0'} as BitbakeScanResult, {disableDevtoolDebugBuild: true} as BitbakeSettings)).toBe('') | ||
expect(addDevtoolDebugBuild('', {_bitbakeVersion: '1.0.0'} as BitbakeScanResult, {disableDevtoolDebugBuild: false} as BitbakeSettings)).toBe('') | ||
}) | ||
}) |