More deprecated assertion cleanup

This commit is contained in:
Logan Ramos 2021-05-04 15:55:14 -04:00
parent af69dc26ca
commit 656e1e6086
No known key found for this signature in database
GPG key ID: D9CCFF14F0B18183
6 changed files with 52 additions and 52 deletions

View file

@ -12,19 +12,19 @@ suite('git', () => {
suite('GitStatusParser', () => {
test('empty parser', () => {
const parser = new GitStatusParser();
assert.deepEqual(parser.status, []);
assert.deepStrictEqual(parser.status, []);
});
test('empty parser 2', () => {
const parser = new GitStatusParser();
parser.update('');
assert.deepEqual(parser.status, []);
assert.deepStrictEqual(parser.status, []);
});
test('simple', () => {
const parser = new GitStatusParser();
parser.update('?? file.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' }
]);
});
@ -34,7 +34,7 @@ suite('git', () => {
parser.update('?? file.txt\0');
parser.update('?? file2.txt\0');
parser.update('?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -51,7 +51,7 @@ suite('git', () => {
parser.update('');
parser.update('?? file3.txt\0');
parser.update('');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -61,7 +61,7 @@ suite('git', () => {
test('combined', () => {
const parser = new GitStatusParser();
parser.update('?? file.txt\0?? file2.txt\0?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -72,7 +72,7 @@ suite('git', () => {
const parser = new GitStatusParser();
parser.update('?? file.txt\0?? file2');
parser.update('.txt\0?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -83,7 +83,7 @@ suite('git', () => {
const parser = new GitStatusParser();
parser.update('?? file.txt');
parser.update('\0?? file2.txt\0?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -94,7 +94,7 @@ suite('git', () => {
const parser = new GitStatusParser();
parser.update('?? file.txt\0?? file2.txt\0?? file3.txt');
parser.update('\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -104,7 +104,7 @@ suite('git', () => {
test('rename', () => {
const parser = new GitStatusParser();
parser.update('R newfile.txt\0file.txt\0?? file2.txt\0?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -115,7 +115,7 @@ suite('git', () => {
const parser = new GitStatusParser();
parser.update('R newfile.txt\0fil');
parser.update('e.txt\0?? file2.txt\0?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' },
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -127,7 +127,7 @@ suite('git', () => {
parser.update('?? file2.txt\0R new');
parser.update('file.txt\0fil');
parser.update('e.txt\0?? file3.txt\0');
assert.deepEqual(parser.status, [
assert.deepStrictEqual(parser.status, [
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
{ path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' },
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
@ -137,7 +137,7 @@ suite('git', () => {
suite('parseGitmodules', () => {
test('empty', () => {
assert.deepEqual(parseGitmodules(''), []);
assert.deepStrictEqual(parseGitmodules(''), []);
});
test('sample', () => {
@ -146,7 +146,7 @@ suite('git', () => {
url = https://github.com/gabime/spdlog.git
`;
assert.deepEqual(parseGitmodules(sample), [
assert.deepStrictEqual(parseGitmodules(sample), [
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
]);
});
@ -166,7 +166,7 @@ suite('git', () => {
url = https://github.com/gabime/spdlog4.git
`;
assert.deepEqual(parseGitmodules(sample), [
assert.deepStrictEqual(parseGitmodules(sample), [
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' },
{ name: 'deps/spdlog2', path: 'deps/spdlog2', url: 'https://github.com/gabime/spdlog.git' },
{ name: 'deps/spdlog3', path: 'deps/spdlog3', url: 'https://github.com/gabime/spdlog.git' },
@ -180,7 +180,7 @@ suite('git', () => {
url = https://github.com/gabime/spdlog.git
`;
assert.deepEqual(parseGitmodules(sample), [
assert.deepStrictEqual(parseGitmodules(sample), [
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
]);
});
@ -191,7 +191,7 @@ suite('git', () => {
url=https://github.com/gabime/spdlog.git
`;
assert.deepEqual(parseGitmodules(sample), [
assert.deepStrictEqual(parseGitmodules(sample), [
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
]);
});
@ -207,7 +207,7 @@ john.doe@mail.com
8e5a374372b8393906c7e380dbb09349c5385554
This is a commit message.\x00`;
assert.deepEqual(parseGitCommits(GIT_OUTPUT_SINGLE_PARENT), [{
assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_SINGLE_PARENT), [{
hash: '52c293a05038d865604c2284aa8698bd087915a1',
message: 'This is a commit message.',
parents: ['8e5a374372b8393906c7e380dbb09349c5385554'],
@ -227,7 +227,7 @@ john.doe@mail.com
8e5a374372b8393906c7e380dbb09349c5385554 df27d8c75b129ab9b178b386077da2822101b217
This is a commit message.\x00`;
assert.deepEqual(parseGitCommits(GIT_OUTPUT_MULTIPLE_PARENTS), [{
assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_MULTIPLE_PARENTS), [{
hash: '52c293a05038d865604c2284aa8698bd087915a1',
message: 'This is a commit message.',
parents: ['8e5a374372b8393906c7e380dbb09349c5385554', 'df27d8c75b129ab9b178b386077da2822101b217'],
@ -247,7 +247,7 @@ john.doe@mail.com
This is a commit message.\x00`;
assert.deepEqual(parseGitCommits(GIT_OUTPUT_NO_PARENTS), [{
assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_NO_PARENTS), [{
hash: '52c293a05038d865604c2284aa8698bd087915a1',
message: 'This is a commit message.',
parents: [],
@ -275,7 +275,7 @@ This is a commit message.\x00`;
const output = parseLsTree(input);
assert.deepEqual(output, [
assert.deepStrictEqual(output, [
{ mode: '040000', type: 'tree', object: '0274a81f8ee9ca3669295dc40f510bd2021d0043', size: '-', file: '.vscode' },
{ mode: '100644', type: 'blob', object: '1d487c1817262e4f20efbfa1d04c18f51b0046f6', size: '491570', file: 'Screen Shot 2018-06-01 at 14.48.05.png' },
{ mode: '100644', type: 'blob', object: '686c16e4f019b734655a2576ce8b98749a9ffdb9', size: '764420', file: 'Screen Shot 2018-06-07 at 20.04.59.png' },
@ -307,7 +307,7 @@ This is a commit message.\x00`;
const output = parseLsFiles(input);
assert.deepEqual(output, [
assert.deepStrictEqual(output, [
{ mode: '100644', object: '7a73a41bfdf76d6f793007240d80983a52f15f97', stage: '0', file: '.vscode/settings.json' },
{ mode: '100644', object: '1d487c1817262e4f20efbfa1d04c18f51b0046f6', stage: '0', file: 'Screen Shot 2018-06-01 at 14.48.05.png' },
{ mode: '100644', object: '686c16e4f019b734655a2576ce8b98749a9ffdb9', stage: '0', file: 'Screen Shot 2018-06-07 at 20.04.59.png' },
@ -325,72 +325,72 @@ This is a commit message.\x00`;
suite('splitInChunks', () => {
test('unit tests', function () {
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 6)],
[['hello'], ['there'], ['cool'], ['stuff']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 10)],
[['hello', 'there'], ['cool', 'stuff']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 12)],
[['hello', 'there'], ['cool', 'stuff']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 14)],
[['hello', 'there', 'cool'], ['stuff']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 2000)],
[['hello', 'there', 'cool', 'stuff']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 1)],
[['0'], ['01'], ['012'], ['0'], ['01'], ['012'], ['0'], ['01'], ['012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 2)],
[['0'], ['01'], ['012'], ['0'], ['01'], ['012'], ['0'], ['01'], ['012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 3)],
[['0', '01'], ['012'], ['0', '01'], ['012'], ['0', '01'], ['012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 4)],
[['0', '01'], ['012', '0'], ['01'], ['012', '0'], ['01'], ['012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 5)],
[['0', '01'], ['012', '0'], ['01', '012'], ['0', '01'], ['012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 6)],
[['0', '01', '012'], ['0', '01', '012'], ['0', '01', '012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 7)],
[['0', '01', '012', '0'], ['01', '012', '0'], ['01', '012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 8)],
[['0', '01', '012', '0'], ['01', '012', '0', '01'], ['012']]
);
assert.deepEqual(
assert.deepStrictEqual(
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 9)],
[['0', '01', '012', '0', '01'], ['012', '0', '01', '012']]
);

View file

@ -18,7 +18,7 @@ suite('markdown.WorkspaceSymbolProvider', () => {
test('Should not return anything for empty workspace', async () => {
const provider = new MarkdownWorkspaceSymbolProvider(symbolProvider, new InMemoryWorkspaceMarkdownDocumentProvider([]));
assert.deepEqual(await provider.provideWorkspaceSymbols(''), []);
assert.deepStrictEqual(await provider.provideWorkspaceSymbols(''), []);
});
test('Should return symbols from workspace with one markdown file', async () => {

View file

@ -15,7 +15,7 @@ suite('vscode API - configuration', () => {
test('configurations, language defaults', function () {
const defaultLanguageSettings = vscode.workspace.getConfiguration().get('[abcLang]');
assert.deepEqual(defaultLanguageSettings, {
assert.deepStrictEqual(defaultLanguageSettings, {
'editor.lineNumbers': 'off',
'editor.tabSize': 2
});
@ -43,7 +43,7 @@ suite('vscode API - configuration', () => {
assert.ok(config.has('get'));
assert.strictEqual(config.get('get'), 'get-prop');
assert.deepEqual(config['get'], config.get);
assert.deepStrictEqual(config['get'], config.get);
assert.throws(() => config['get'] = <any>'get-prop');
});
});

View file

@ -218,8 +218,8 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void,
eventIndex++;
assert.strictEqual('active', expected.events.shift(), `onDidChangeActive (event ${eventIndex})`);
const expectedItems = expected.activeItems.shift();
assert.deepEqual(items.map(item => item.label), expectedItems, `onDidChangeActive event items (event ${eventIndex})`);
assert.deepEqual(quickPick.activeItems.map(item => item.label), expectedItems, `onDidChangeActive active items (event ${eventIndex})`);
assert.deepStrictEqual(items.map(item => item.label), expectedItems, `onDidChangeActive event items (event ${eventIndex})`);
assert.deepStrictEqual(quickPick.activeItems.map(item => item.label), expectedItems, `onDidChangeActive active items (event ${eventIndex})`);
} catch (err) {
done(err);
}
@ -233,8 +233,8 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void,
eventIndex++;
assert.strictEqual('selection', expected.events.shift(), `onDidChangeSelection (event ${eventIndex})`);
const expectedItems = expected.selectionItems.shift();
assert.deepEqual(items.map(item => item.label), expectedItems, `onDidChangeSelection event items (event ${eventIndex})`);
assert.deepEqual(quickPick.selectedItems.map(item => item.label), expectedItems, `onDidChangeSelection selected items (event ${eventIndex})`);
assert.deepStrictEqual(items.map(item => item.label), expectedItems, `onDidChangeSelection event items (event ${eventIndex})`);
assert.deepStrictEqual(quickPick.selectedItems.map(item => item.label), expectedItems, `onDidChangeSelection selected items (event ${eventIndex})`);
} catch (err) {
done(err);
}
@ -248,9 +248,9 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void,
eventIndex++;
assert.strictEqual('accept', expected.events.shift(), `onDidAccept (event ${eventIndex})`);
const expectedActive = expected.acceptedItems.active.shift();
assert.deepEqual(quickPick.activeItems.map(item => item.label), expectedActive, `onDidAccept active items (event ${eventIndex})`);
assert.deepStrictEqual(quickPick.activeItems.map(item => item.label), expectedActive, `onDidAccept active items (event ${eventIndex})`);
const expectedSelection = expected.acceptedItems.selection.shift();
assert.deepEqual(quickPick.selectedItems.map(item => item.label), expectedSelection, `onDidAccept selected items (event ${eventIndex})`);
assert.deepStrictEqual(quickPick.selectedItems.map(item => item.label), expectedSelection, `onDidAccept selected items (event ${eventIndex})`);
if (expected.acceptedItems.dispose.shift()) {
quickPick.dispose();
}

View file

@ -598,7 +598,7 @@ suite('vscode API - workspace', () => {
source.cancel();
return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => {
assert.deepEqual(res, []);
assert.deepStrictEqual(res, []);
});
});

View file

@ -176,14 +176,14 @@ suite('ExtensionsWorkbenchServiceTest', () => {
assert.strictEqual(4, actual.rating);
assert.strictEqual(100, actual.ratingCount);
assert.strictEqual(false, actual.outdated);
assert.deepEqual(['pub.1', 'pub.2'], actual.dependencies);
assert.deepStrictEqual(['pub.1', 'pub.2'], actual.dependencies);
});
});
test('test for empty installed extensions', async () => {
testObject = await aWorkbenchService();
assert.deepEqual([], testObject.local);
assert.deepStrictEqual([], testObject.local);
});
test('test for installed extensions', async () => {
@ -233,7 +233,7 @@ suite('ExtensionsWorkbenchServiceTest', () => {
assert.strictEqual(undefined, actual.rating);
assert.strictEqual(undefined, actual.ratingCount);
assert.strictEqual(false, actual.outdated);
assert.deepEqual(['pub.1', 'pub.2'], actual.dependencies);
assert.deepStrictEqual(['pub.1', 'pub.2'], actual.dependencies);
actual = actuals[1];
assert.strictEqual(ExtensionType.System, actual.type);
@ -251,7 +251,7 @@ suite('ExtensionsWorkbenchServiceTest', () => {
assert.strictEqual(undefined, actual.rating);
assert.strictEqual(undefined, actual.ratingCount);
assert.strictEqual(false, actual.outdated);
assert.deepEqual([], actual.dependencies);
assert.deepStrictEqual([], actual.dependencies);
});
test('test installed extensions get syncs with gallery', async () => {
@ -327,7 +327,7 @@ suite('ExtensionsWorkbenchServiceTest', () => {
assert.strictEqual(4, actual.rating);
assert.strictEqual(100, actual.ratingCount);
assert.strictEqual(true, actual.outdated);
assert.deepEqual(['pub.1'], actual.dependencies);
assert.deepStrictEqual(['pub.1'], actual.dependencies);
actual = actuals[1];
assert.strictEqual(ExtensionType.System, actual.type);
@ -345,7 +345,7 @@ suite('ExtensionsWorkbenchServiceTest', () => {
assert.strictEqual(undefined, actual.rating);
assert.strictEqual(undefined, actual.ratingCount);
assert.strictEqual(false, actual.outdated);
assert.deepEqual([], actual.dependencies);
assert.deepStrictEqual([], actual.dependencies);
});
});