Skip to content

Commit

Permalink
ci(test): Run other tests (#72)
Browse files Browse the repository at this point in the history
To clean code and workable.
  • Loading branch information
5ouma committed Jun 12, 2024
1 parent eefc96b commit 225d035
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,14 @@ jobs:
with:
deno-version: v1.x

- name: 🧪 Test Libraries
- name: 🧪 Run Tests
run: deno task test

- name: 🧹 Lint Check
run: deno lint

- name: 📝 Format Check
run: deno fmt --check

- name: 🔍 Type Check
run: deno check ./**/*.ts
2 changes: 1 addition & 1 deletion src/libs/convert.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { stringify } from "@libs/xml";
import { parse } from "@std/toml";
import { Feed, List, Lists, OPMLOutline } from "../types/mod.ts";
import type { Feed, List, Lists, OPMLOutline } from "../types/mod.ts";

export function convertToTOML(data: string): Lists {
const lists: Lists = parse(data) as Lists;
Expand Down
4 changes: 2 additions & 2 deletions src/libs/io.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { paramCase } from "@wok/case";
import { format } from "@std/path";
import { List, Lists } from "../types/mod.ts";
import { convertToOPML, convertToTOML } from "./mod.ts";
import { convertToOPML, convertToTOML } from "./convert.ts";
import type { List, Lists } from "../types/mod.ts";

export async function readTOML(file: string): Promise<Lists> {
try {
Expand Down
1 change: 0 additions & 1 deletion src/libs/mod.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./io.ts";
export * from "./convert.ts";
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { parseArgs } from "@std/cli";
import { basename, resolve } from "@std/path";
import { readTOML, writeXML } from "./libs/mod.ts";
import { Lists } from "./types/mod.ts";
import type { Lists } from "./types/mod.ts";

const flags = parseArgs(Deno.args, {
string: ["feeds", "output"],
Expand Down
4 changes: 2 additions & 2 deletions test/libs/convert_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals } from "@std/assert";
import { convertToOPML, convertToTOML } from "../../src/libs/mod.ts";
import { List, Lists } from "../../src/types/mod.ts";
import { convertToOPML, convertToTOML } from "../../src/libs/convert.ts";
import type { List, Lists } from "../../src/types/mod.ts";

Deno.test("Parse TOML", () => {
const feeds: Lists = {
Expand Down
10 changes: 3 additions & 7 deletions test/libs/io_test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import { assertEquals, assertIsError } from "@std/assert";
import { join } from "@std/path";
import {
convertToOPML,
convertToTOML,
readTOML,
writeXML,
} from "../../src/libs/mod.ts";
import { Lists } from "../../src/types/toml.ts";
import { readTOML, writeXML } from "../../src/libs/io.ts";
import { convertToOPML, convertToTOML } from "../../src/libs/convert.ts";
import type { Lists } from "../../src/types/mod.ts";

Deno.test("Read TOML", async () => {
const toml = `
Expand Down

0 comments on commit 225d035

Please sign in to comment.