Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

hotfix #7

Merged
merged 1 commit into from
Nov 7, 2023
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
4 changes: 3 additions & 1 deletion __tests__/basic/script.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { describe, test, expect } from "vitest";
import { func1, func2 } from "../../basic/script";

describe("ループ・配列の問題", () => {
describe("ループ・配列・データ型の問題", () => {
test("func1", () => expect(func1(5)).toEqual([1, 2, 3, 4, 5]));
test("func1", () => expect(func1(8)).toEqual([1, 2, 3, 4, 5, 6, 7, 8]));
test("func1", () => expect(func1(0)).toEqual([]));
test("func1", () => expect(func1(-1)).toEqual([]));
test("func1", () => expect(func1(0.5)).toEqual([]));
test("func1", () => expect(func1("hogehoge")).toEqual([]));
});

Expand All @@ -18,5 +19,6 @@ describe("条件分岐・データ型の問題", () => {
test("func2", () => expect(func2(30)).toEqual("FizzBuzz"));
test("func2", () => expect(func2(0)).toEqual("error"));
test("func2", () => expect(func2(-1)).toEqual("error"));
test("func2", () => expect(func1(0.5)).toEqual("error"));
test("func2", () => expect(func2("hogehoge")).toEqual("error"));
});
2 changes: 1 addition & 1 deletion basic/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ループ・配列
// ループ・配列・データ型
export const func1 = (n) => {
// ここに回答
};
Expand Down
Loading