Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Aug 1, 2017
1 parent e778b05 commit cc71b93
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
31 changes: 20 additions & 11 deletions test/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FolderType } from "../src/models/FolderType.enum";
import { enableSpecificFolderIcons } from "../src/commands/folders/folders-specific";
import { enableClassicFolderIcons } from "../src/commands/folders/folders-classic";
import { disableFolderIcons } from "../src/commands/folders/folders-none";
import { enableBlueFolderIcons } from "../src/commands/folders/folders-blue";

suite("commands", () => {
test("enable angular icons", () => {
Expand All @@ -27,7 +28,18 @@ suite("commands", () => {
});
});

test("enable folder icons", () => {
test("restore default configuration", () => {
return config.restoreDefaultConfig().then(() => {
return angular.checkAngularIconsStatus().then(result => {
assert.equal(result, true);
folders.checkFolderIconsStatus().then(result => {
assert.equal(result, FolderType.Specific);
});
});
});
});

test("enable specific folder icons", () => {
return enableSpecificFolderIcons().then(() => {
return folders.checkFolderIconsStatus().then(result => {
assert.equal(result, FolderType.Specific);
Expand All @@ -43,21 +55,18 @@ suite("commands", () => {
});
});

test("disable folder icons", () => {
return disableFolderIcons().then(() => {
test("enable blue folder icons", () => {
return enableBlueFolderIcons().then(() => {
return folders.checkFolderIconsStatus().then(result => {
assert.equal(result, FolderType.None);
assert.equal(result, FolderType.Blue);
});
});
});

test("restore default configuration", () => {
return config.restoreDefaultConfig().then(() => {
return angular.checkAngularIconsStatus().then(result => {
assert.equal(result, true);
folders.checkFolderIconsStatus().then(result => {
assert.equal(result, FolderType.Specific);
});
test("disable folder icons", () => {
return disableFolderIcons().then(() => {
return folders.checkFolderIconsStatus().then(result => {
assert.equal(result, FolderType.None);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const testRunner = require('vscode/lib/testrunner');
testRunner.configure({
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
useColors: true, // colored output from test results
timeout: 15000,
timeout: 20000,
});

module.exports = testRunner;

0 comments on commit cc71b93

Please sign in to comment.