-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.js
More file actions
29 lines (24 loc) · 1.12 KB
/
basic.js
File metadata and controls
29 lines (24 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"use strict";
const expect = require("chai").expect;
const codecheck = require("codecheck");
const app = codecheck.consoleApp(process.env.APP_COMMAND);
describe("CLIアプリは", () => {
it("'World'が与えられた場合に'Hello World!'と出力できる。", () => {
return app.codecheck("World").then( result => {
expect(result.code).to.equal(0, "expect codecheck CLI to exit with status code 0");
expect(result.stdout.join("")).to.equal("Hello World!");
})
});
it("'織田信長'が与えられた場合に'Hello 織田信長!'と出力できる。", () => {
return app.codecheck("織田信長").then( result => {
expect(result.code).to.equal(0, "expect codecheck CLI to exit with status code 0");
expect(result.stdout.join("")).to.equal("Hello 織田信長!");
})
});
it("'codecheck'が与えられた場合に'Hello codecheck!'と出力できる。", () => {
return app.codecheck("codecheck").then( result => {
expect(result.code).to.equal(0, "expect codecheck CLI to exit with status code 0");
expect(result.stdout.join("")).to.equal("Hello codecheck!");
})
});
});