Skip to content

Commit 82b6def

Browse files
committed
Clean: format code.
Fix: tests use older CodeMirror until bug is fixed.
1 parent 80567a0 commit 82b6def

File tree

4 files changed

+15
-33
lines changed

4 files changed

+15
-33
lines changed

client/package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
'@codemirror/lang-xml': '^6.1.0',
6262
'@codemirror/lang-yaml': '^6.1.2',
6363
'@codemirror/state': '^6.5.2',
64-
'@codemirror/view': '^6.39.0',
64+
'@codemirror/view': '=6.38.8',
6565
'@hpcc-js/wasm-graphviz': '^1.16.0',
6666
'@mathjax/mathjax-newcm-font': '4.0.0',
6767
codemirror: '^6.0.2',

client/src/CodeMirror-integration.mts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,7 @@ export const docBlockField = StateField.define<DecorationSet>({
326326
contents,
327327
]: CodeMirrorDocBlockTuple) =>
328328
Decoration.replace({
329-
widget: new DocBlockWidget(
330-
indent,
331-
delimiter,
332-
contents,
333-
),
329+
widget: new DocBlockWidget(indent, delimiter, contents),
334330
...decorationOptions,
335331
}).range(from, to),
336332
),

client/src/debug_enabled.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
//
1717
// `debug_enable.mts` -- Configure debug features
1818
// =============================================================================
19+
//
1920
// True to enable additional debug logging.
2021
export const DEBUG_ENABLED = false;
2122

server/tests/overall_core/mod.rs

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,6 @@ async fn test_client_updates_core(
11721172
message: EditorMessageContents::Result(Ok(ResultOkTypes::Void))
11731173
}
11741174
);
1175-
sleep(Duration::from_secs(1000)).await;
11761175

11771176
// Trigger a client edit to send the Client contents back.
11781177
let code_line = driver_ref.find(By::Css(code_line_css)).await.unwrap();
@@ -1327,7 +1326,7 @@ async fn test_5_core(
13271326
"
13281327
)
13291328
.to_string();
1330-
let server_id = perform_loadfile(
1329+
let mut server_id = perform_loadfile(
13311330
&codechat_server,
13321331
test_dir,
13331332
"test.py",
@@ -1383,18 +1382,11 @@ async fn test_5_core(
13831382
mode: "python".to_string(),
13841383
},
13851384
source: CodeMirrorDiffable::Diff(CodeMirrorDiff {
1386-
doc: vec![
1387-
StringDiff {
1388-
from: 0,
1389-
to: Some(8),
1390-
insert: "# fooTest.\n".to_string(),
1391-
},
1392-
StringDiff {
1393-
from: 24,
1394-
to: Some(55,),
1395-
insert: "# digraph g { A -> B }\n".to_string(),
1396-
}
1397-
],
1385+
doc: vec![StringDiff {
1386+
from: 0,
1387+
to: Some(8),
1388+
insert: "# fooTest.\n".to_string(),
1389+
},],
13981390
doc_blocks: vec![],
13991391
version,
14001392
}),
@@ -1418,7 +1410,7 @@ async fn test_5_core(
14181410
message: EditorMessageContents::Result(Ok(ResultOkTypes::Void))
14191411
}
14201412
);
1421-
//server_id += MESSAGE_ID_INCREMENT;
1413+
server_id += MESSAGE_ID_INCREMENT;
14221414

14231415
// Send new text, which turns into a diff.
14241416
let ide_id = codechat_server
@@ -1452,18 +1444,11 @@ async fn test_5_core(
14521444
mode: "python".to_string(),
14531445
},
14541446
source: CodeMirrorDiffable::Diff(CodeMirrorDiff {
1455-
doc: vec![
1456-
StringDiff {
1457-
from: 0,
1458-
to: Some(8),
1459-
insert: "# Tesbart.\n".to_string(),
1460-
},
1461-
StringDiff {
1462-
from: 24,
1463-
to: Some(55,),
1464-
insert: "# digraph g { A -> B }\n".to_string(),
1465-
}
1466-
],
1447+
doc: vec![StringDiff {
1448+
from: 0,
1449+
to: Some(8),
1450+
insert: "# Tesbart.\n".to_string(),
1451+
},],
14671452
doc_blocks: vec![],
14681453
version,
14691454
}),

0 commit comments

Comments
 (0)