Skip to content

Commit

Permalink
add case
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritaniAyaka committed Oct 11, 2022
1 parent dfb86b7 commit 6a301a5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
19 changes: 19 additions & 0 deletions src/index3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default function (a: number) {
switch (a) {
case 1:
console.log(1);
break;

case 2:
console.log(2);
break;

case 3:
console.log(3);
break;

default:
console.log('default');
}
return a;
}
13 changes: 9 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import func from "../src/index";
import func2 from "../src/index2";
import func3 from "../src/index3";
import { it } from "mocha";

it("index", () => {
func(true);
func(false);
func(true);
func(false);
});

it("index2", () => {
func2(true);
func2(false);
func2(true);
func2(false);
});

it("index3", () => {
func3(1);
})

0 comments on commit 6a301a5

Please sign in to comment.