Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test cases #2181

Merged
merged 2 commits into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions test/iconsManifest/specsExtensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ describe('Specifications of supported extensions: tests', function () {
const iconsDirPath = ConfigManager.iconsDir;

context('extension', function () {
it('has an associated icon file', function () {
files.supported.forEach(async (file: IFileExtension) => {
it('has an associated icon file', async function () {
for (const supportedFile of files.supported) {
const filename =
`${constants.iconsManifest.fileTypePrefix}${file.icon}` +
`${constants.iconsManifest.fileTypePrefix}${supportedFile.icon}` +
`${constants.iconsManifest.iconSuffix}.${
FileFormat[file.format]
FileFormat[supportedFile.format]
}`;
const iconFilePath = join(iconsDirPath, filename);

const pathExists = await existsAsync(iconFilePath);

expect(pathExists).to.be.true;
});
}
});

context('does NOT have', function () {
Expand Down Expand Up @@ -83,21 +83,21 @@ describe('Specifications of supported extensions: tests', function () {
});

context('that has a light theme version', function () {
it('has an associated icon file', function () {
files.supported
.filter((file: IFileExtension) => file.light)
.forEach(async (file: IFileExtension) => {
const filename = `${
constants.iconsManifest.fileTypeLightPrefix
}${file.icon}${constants.iconsManifest.iconSuffix}.${
FileFormat[file.format]
}`;
const iconFilePath = join(iconsDirPath, filename);
it('has an associated icon file', async function () {
for (const supportedFile of files.supported.filter(
(file: IFileExtension) => file.light,
)) {
const filename = `${constants.iconsManifest.fileTypeLightPrefix}${
supportedFile.icon
}${constants.iconsManifest.iconSuffix}.${
FileFormat[supportedFile.format]
}`;
const iconFilePath = join(iconsDirPath, filename);

const pathExists = await existsAsync(iconFilePath);
const pathExists = await existsAsync(iconFilePath);

expect(pathExists).to.be.true;
});
expect(pathExists).to.be.true;
}
});
});
});
Expand Down