@academyjs/rover
Version:
Rover allows you to learn programming interactively.
40 lines (38 loc) • 1.99 kB
JavaScript
;
/**
* Copyright (c) AcademyJS and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
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 });
const assertions_1 = require("../../assertions");
suite({
title: "Print a text message on the console.",
handle: "node/hello-world",
description: `The Hello World program is a program that prints "Hello, world!". It is very simple in most
programming languages, and is used to show the basic syntax of a programming language.
Write a program to print "Hello, world!" on the console.
Example run:
\`\`\`
$ node index.js
Hello, world!⏎
\`\`\``,
tags: ["node", "javascript", "js"],
});
test("Write the program in 'hello.js'", "This is a huge description.", () => __awaiter(void 0, void 0, void 0, function* () {
yield (0, assertions_1.fileExists)("hello.js", "Cannot find file 'hello.js'");
}));
test("Print 'Hello, world!\\n' to the standard output stream", "This is a sample description.", () => __awaiter(void 0, void 0, void 0, function* () {
yield (0, assertions_1.spawnPrints)("node hello.js", "", "Hello, world!\n", "", "Print 'Hello, world!\n' to using `console.log`");
}));
//# sourceMappingURL=hello-world.js.map