poyka
Version:
A framework for interactively creating, extending and maintaining web application as never easier before while doing it in elegant design patterns.
50 lines • 3.81 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnitTest = void 0;
const decova_terminal_1 = require("decova-terminal");
class UnitTest {
static TakeControl() {
return __awaiter(this, void 0, void 0, function* () {
yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to ensure tsconfig.json");
decova_terminal_1.CurrentTerminal.Exec("npx tsconfig.json");
decova_terminal_1.CurrentTerminal.Instruct("@File tsconfig.json ...");
decova_terminal_1.CurrentTerminal.Instruct("... outDir = ./dist");
decova_terminal_1.CurrentTerminal.Instruct("...@Just under outDir prop ...");
decova_terminal_1.CurrentTerminal.Instruct("... declaration : true");
decova_terminal_1.CurrentTerminal.Instruct("... declarationMap : true");
decova_terminal_1.CurrentTerminal.Instruct("... declarationDir : ./dist");
decova_terminal_1.CurrentTerminal.Instruct("Make sure [Jasmine Test Explorer] extension is installed.");
yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to install Jasmine and its types");
decova_terminal_1.CurrentTerminal.Exec("npm i --save-dev jasmine");
decova_terminal_1.CurrentTerminal.Exec("npm i @types/jasmine");
decova_terminal_1.CurrentTerminal.Instruct("@File tsconfig.json ...");
decova_terminal_1.CurrentTerminal.Instruct("... @include [] property ...");
decova_terminal_1.CurrentTerminal.Instruct("... add ./spec/**/*.ts");
yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to create jasmine configuration");
decova_terminal_1.CurrentTerminal.Exec("jasmine init");
decova_terminal_1.CurrentTerminal.Instruct("@File /spec/support/jasmine.json ...");
decova_terminal_1.CurrentTerminal.Instruct("... spec_dir : ./dist/spec");
decova_terminal_1.CurrentTerminal.Instruct("@Dir /spec ...");
decova_terminal_1.CurrentTerminal.Instruct("... Ensure at least somefile.spec.ts");
decova_terminal_1.CurrentTerminal.Instruct("@File /spec/someFile.spec.ts ...");
decova_terminal_1.CurrentTerminal.Instruct("... write a test code sample {describe-it lablablah}");
decova_terminal_1.CurrentTerminal.Instruct("@src dir");
decova_terminal_1.CurrentTerminal.Instruct("... Make sure you have at least one .ts file there.");
yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to transpile");
decova_terminal_1.CurrentTerminal.Exec("tsc");
decova_terminal_1.CurrentTerminal.Exec("start \"G:\\GGGBrain\\OneDrive\\GGGHowTo\\ggg VSCode open jasmine test explorer@gui-jasmine.gif\"");
decova_terminal_1.CurrentTerminal.Instruct("If no gif opened: ggg Open Jasmine Test Explorer and make sure you can see your sample test");
});
}
}
exports.UnitTest = UnitTest;
//# sourceMappingURL=UnitTest.js.map