Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run other tests #72

Merged
merged 2 commits into from
Jun 12, 2024
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
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
Loading