Skip to content

Commit 48c916a

Browse files
fix lint
1 parent a0e3e04 commit 48c916a

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

src/extension/debugger/configuration/providers/djangoLaunch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function buildDjangoLaunchDebugConfiguration(
3131
program: program || defaultProgram,
3232
args: ['runserver'],
3333
django: true,
34-
autoStartBrowser: false
34+
autoStartBrowser: false,
3535
};
3636
if (!program) {
3737
const selectedProgram = await input.showInputBox({

src/extension/debugger/configuration/providers/flaskLaunch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function buildFlaskLaunchDebugConfiguration(
3232
},
3333
args: ['run', '--no-debugger', '--no-reload'],
3434
jinja: true,
35-
autoStartBrowser: false
35+
autoStartBrowser: false,
3636
};
3737

3838
if (!application) {

src/test/unittest/configuration/providers/djangoLaunch.unit.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ suite('Debugging - Configuration Provider Django', () => {
109109
program: 'hello',
110110
args: ['runserver'],
111111
django: true,
112-
autoStartBrowser: false
113-
112+
autoStartBrowser: false,
114113
};
115114

116115
expect(state.config).to.be.deep.equal(config);
@@ -131,7 +130,7 @@ suite('Debugging - Configuration Provider Django', () => {
131130
program: defaultProgram,
132131
args: ['runserver'],
133132
django: true,
134-
autoStartBrowser: false
133+
autoStartBrowser: false,
135134
};
136135

137136
expect(state.config).to.be.deep.equal(config);

src/test/unittest/configuration/providers/flaskLaunch.unit.test.ts

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,28 @@ suite('Debugging - Configuration Provider Flask', () => {
4141

4242
expect(file).to.be.equal('app.py');
4343
});
44+
test('Launch JSON with valid python path', async () => {
45+
const folder = { uri: Uri.parse(path.join('one', 'two')), name: '1', index: 0 };
46+
const state = { config: {}, folder };
47+
48+
await flaskLaunch.buildFlaskLaunchDebugConfiguration(instance(input), state);
49+
50+
const config = {
51+
name: DebugConfigStrings.flask.snippet.name,
52+
type: DebuggerTypeName,
53+
request: 'launch',
54+
module: 'flask',
55+
env: {
56+
FLASK_APP: 'app.py',
57+
FLASK_DEBUG: '1',
58+
},
59+
args: ['run', '--no-debugger', '--no-reload'],
60+
jinja: true,
61+
autoStartBrowser: false,
62+
};
63+
64+
expect(state.config).to.be.deep.equal(config);
65+
});
4466
test('Launch JSON with selected app path', async () => {
4567
const folder = { uri: Uri.parse(path.join('one', 'two')), name: '1', index: 0 };
4668
const state = { config: {}, folder };
@@ -60,7 +82,7 @@ suite('Debugging - Configuration Provider Flask', () => {
6082
},
6183
args: ['run', '--no-debugger', '--no-reload'],
6284
jinja: true,
63-
autoStartBrowser: false
85+
autoStartBrowser: false,
6486
};
6587

6688
expect(state.config).to.be.deep.equal(config);
@@ -83,7 +105,7 @@ suite('Debugging - Configuration Provider Flask', () => {
83105
},
84106
args: ['run', '--no-debugger', '--no-reload'],
85107
jinja: true,
86-
autoStartBrowser: false
108+
autoStartBrowser: false,
87109
};
88110

89111
expect(state.config).to.be.deep.equal(config);

0 commit comments

Comments
 (0)