Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.

Commit c69777b

Browse files
authored
Bump types node to 16.3.3 (#655)
* Bump @types/node from 15.12.5 to 16.3.3 (alt) * temporary fix to insert null as third param in setTimeout call Signed-off-by: Brian Fitzpatrick <[email protected]>
1 parent 2aeaba8 commit c69777b

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
"@types/chai": "^4.2.21",
288288
"@types/glob": "^7.1.4",
289289
"@types/mocha": "^8.2.3",
290-
"@types/node": "^15.12.5",
290+
"@types/node": "^16.3.3",
291291
"@types/sinon": "^10.0.2",
292292
"@types/vscode": "^1.57.1",
293293
"@typescript-eslint/eslint-plugin": "^4.28.4",

src/test/suite/completions.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import { expect } from 'chai';
2020
import * as path from 'path';
2121
import * as vscode from 'vscode';
22-
import { removeFilesAndFolders } from '../../utils';
22+
import { removeFilesAndFolders, delay } from '../../utils';
2323
import { Position, Range, TextEditor } from "vscode";
2424

2525
const testWorkspace = path.resolve(__dirname, '..', '..', '..', './test Fixture with speci@l chars');
@@ -73,10 +73,6 @@ async function testWeGetExpectedResult(textToInsert : string, expectedResult: st
7373
expect(editor.document.getText()).to.include(expectedResult);
7474
}
7575

76-
function delay(ms: number) {
77-
return new Promise( resolve => setTimeout(resolve, ms) );
78-
}
79-
8076
async function initializeTextEditor(textEditor: TextEditor, initializeWith = "") {
8177
const doc = textEditor.document;
8278
await textEditor.edit((editBuilder) => {

src/test/suite/stubDemoTutorial.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { DidactUri } from '../../didactUri';
2323
import { handleText } from '../../commandHandler';
2424
import { waitUntil } from 'async-wait-until';
2525
import { fail } from 'assert';
26+
import { delay } from '../../utils';
2627

2728
const testMD = Uri.parse('vscode://redhat.vscode-didact?extension=demos/markdown/didact-demo.didact.md');
2829

@@ -108,10 +109,6 @@ suite('stub out a tutorial', () => {
108109
return clipboard_content.trim();
109110
}
110111

111-
function delay(ms: number) {
112-
return new Promise( resolve => setTimeout(resolve, ms) );
113-
}
114-
115112
async function executeAndWait(command: string): Promise<void> {
116113
await commands.executeCommand(command);
117114
delay(200);
@@ -135,5 +132,4 @@ suite('stub out a tutorial', () => {
135132
term = window.activeTerminal;
136133
}
137134
}
138-
139135
});

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export function getValue(input : string | string[]) : string | undefined {
111111

112112
// utility method to do a simple delay of a few ms
113113
export function delay(ms: number): Promise<unknown> {
114-
return new Promise( resolve => setTimeout(resolve, ms) );
114+
return new Promise( resolve => setTimeout(resolve, ms, null) );
115115
}
116116

117117
export function getDefaultUrl() : string | undefined {

0 commit comments

Comments
 (0)